summaryrefslogtreecommitdiff
path: root/Userland/Demos
diff options
context:
space:
mode:
authorJelle Raaijmakers <jelle@gmta.nl>2022-01-31 17:45:14 +0100
committerLinus Groh <mail@linusgroh.de>2022-02-22 23:48:59 +0000
commit8c9fa50c61ae92f3eaf45c225b1aea9f82689955 (patch)
tree4533804f1f75387dacfce17b3058985d87d91d4a /Userland/Demos
parent38326564645ef3f469b619ee21083996281d3d73 (diff)
downloadserenity-8c9fa50c61ae92f3eaf45c225b1aea9f82689955.zip
LibSoftGPU: Apply regular cartesian coordinate system
Currently, LibSoftGPU is still OpenGL-minded in that it uses a coordinate system with the origin of `(0, 0)` at the lower-left of textures, buffers and window coordinates. Because we are blitting to a `Gfx::Bitmap` that has the origin at the top-left, we need to flip the Y-coordinates somewhere in the rasterization logic. We used to do this during conversion of NDC-coordinates to window coordinates. This resulted in some incorrect behavior when rasterization did not pass through the vertex transformation logic, e.g. when calling `glDrawPixels`. This changes the coordinate system to OpenGL's throughout, only to blit the final color buffer upside down to the target bitmap. This fixes drawing to the depth buffer directly resulting in upside down images.
Diffstat (limited to 'Userland/Demos')
0 files changed, 0 insertions, 0 deletions