1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 22:18:12 +00:00
serenity/Userland/Libraries/LibSoftGPU
Jelle Raaijmakers 8c9fa50c61 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.
2022-02-22 23:48:59 +00:00
..
Buffer LibSoftGPU: Apply regular cartesian coordinate system 2022-02-22 23:48:59 +00:00
Light LibGL+LibSoftGPU: Remove unused variable specular_exponent 2022-01-18 01:48:51 +02:00
AlphaBlendFactors.h LibSoftGPU: Move alpha blend factor setup out of triangle rasterization 2022-01-09 16:21:13 +03:30
Clipper.cpp LibSoftGPU: Dispatch based on ClipPlane enum at compile-time 2022-02-10 10:33:31 +00:00
Clipper.h LibSoftGPU: Dispatch based on ClipPlane enum at compile-time 2022-02-10 10:33:31 +00:00
CMakeLists.txt LibSoftGPU: Generalize pixel buffers and standardize on BGRA8888 2022-02-22 23:48:59 +00:00
Config.h LibSoftGPU: Configure stats overlay period 2022-01-22 08:57:31 +03:30
Device.cpp LibSoftGPU: Apply regular cartesian coordinate system 2022-02-22 23:48:59 +00:00
Device.h LibSoftGPU: Apply regular cartesian coordinate system 2022-02-22 23:48:59 +00:00
DeviceInfo.h LibSoftGPU: Announce NPOT texture support via DeviceInfo struct 2022-01-19 19:57:49 +01:00
Enums.h LibSoftGPU: Generalize pixel buffers and standardize on BGRA8888 2022-02-22 23:48:59 +00:00
Image.cpp LibGL+LibSoftGPU: Use more expressive is_power_of_two 2022-02-22 23:48:59 +00:00
Image.h LibSoftGPU: Generalize pixel buffers and standardize on BGRA8888 2022-02-22 23:48:59 +00:00
ImageDataLayout.h LibSoftGPU: Add methods to read and write image data 2021-12-24 05:10:28 -08:00
ImageFormat.h Everywhere: Remove redundant inline keyword 2022-01-29 21:45:17 +02:00
PixelQuad.h LibGL+LibSoftGPU: Add multiple texture coordinates to vertex struct 2022-01-19 19:57:49 +01:00
Sampler.cpp LibSoftGPU: Use bitwise and instead of modulus operator for POT textures 2022-01-09 16:21:13 +03:30
Sampler.h LibSoftGPU: Vectorize texture sampling and shading 2022-01-09 16:21:13 +03:30
SIMD.h LibSoftGPU: Add SIMD.h with SoftGPU specific SIMD functions 2022-01-09 16:21:13 +03:30
Triangle.h LibGL+LibSoftGPU: Move Vertex and Triangle structs to LibSoftGPU 2021-12-24 05:10:28 -08:00
Vertex.h LibGL+LibSoftGPU: Add multiple texture coordinates to vertex struct 2022-01-19 19:57:49 +01:00