mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:37:35 +00:00
LibGL: Add supporting code for depth buffer
This adds glClearDepth() and new caps for enabling and disabling the depth buffer with glEnable() and glDisable()
This commit is contained in:
parent
d922c2f5f3
commit
a8fc4be47a
6 changed files with 57 additions and 4 deletions
|
@ -25,6 +25,7 @@ public:
|
|||
virtual void gl_begin(GLenum mode) override;
|
||||
virtual void gl_clear(GLbitfield mask) override;
|
||||
virtual void gl_clear_color(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) override;
|
||||
virtual void gl_clear_depth(GLdouble depth) override;
|
||||
virtual void gl_color(GLdouble r, GLdouble g, GLdouble b, GLdouble a) override;
|
||||
virtual void gl_end() override;
|
||||
virtual void gl_frustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near_val, GLdouble far_val) override;
|
||||
|
@ -60,6 +61,7 @@ private:
|
|||
Vector<FloatMatrix4x4> m_model_view_matrix_stack;
|
||||
|
||||
FloatVector4 m_clear_color = { 0.0f, 0.0f, 0.0f, 0.0f };
|
||||
double m_clear_depth = { 1.0 };
|
||||
FloatVector4 m_current_vertex_color = { 1.0f, 1.0f, 1.0f, 1.0f };
|
||||
|
||||
Vector<GLVertex, 96> vertex_list;
|
||||
|
@ -69,6 +71,8 @@ private:
|
|||
GLenum m_error = GL_NO_ERROR;
|
||||
bool m_in_draw_state = false;
|
||||
|
||||
bool m_depth_test_enabled = false;
|
||||
|
||||
bool m_cull_faces = false;
|
||||
GLenum m_front_face = GL_CCW;
|
||||
GLenum m_culled_sides = GL_BACK;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue