1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 22:47:45 +00:00

LibGL: Implement glClearDepthf and store as float

Our API still specifies it as a double, but internally we communicate a
float to the rasterizer. Additionally, clamp the value to 0..1 as
described in the spec.
This commit is contained in:
Jelle Raaijmakers 2022-02-21 01:26:27 +01:00 committed by Linus Groh
parent 36a732e98e
commit 44a3d5c101
4 changed files with 9 additions and 3 deletions

View file

@ -208,7 +208,7 @@ private:
Gfx::IntRect m_viewport;
FloatVector4 m_clear_color { 0.0f, 0.0f, 0.0f, 0.0f };
double m_clear_depth { 1.0 };
float m_clear_depth { 1.f };
u8 m_clear_stencil { 0 };
FloatVector4 m_current_vertex_color = { 1.0f, 1.0f, 1.0f, 1.0f };