mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-01 15:18:06 +00:00
LibGL: Add back face culling functions
Adds all needed functions to support back face culling and implements back face culling in the SoftwareGLContext.
This commit is contained in:
parent
eff3c8a954
commit
e6c0600499
Notes:
sideshowbarker
2024-07-18 18:32:07 +09:00
Author: https://github.com/sunverwerth
Commit: e6c0600499
Pull-request: https://github.com/SerenityOS/serenity/pull/6375
Reviewed-by: https://github.com/Hendiadyoin1
Reviewed-by: https://github.com/IdanHo
Reviewed-by: https://github.com/Quaker762
Reviewed-by: https://github.com/alimpfard
Reviewed-by: https://github.com/ccapitalK
Reviewed-by: https://github.com/gmta
5 changed files with 112 additions and 0 deletions
|
@ -35,6 +35,10 @@ public:
|
|||
virtual void gl_translate(GLdouble x, GLdouble y, GLdouble z) override;
|
||||
virtual void gl_vertex(GLdouble x, GLdouble y, GLdouble z, GLdouble w) override;
|
||||
virtual void gl_viewport(GLint x, GLint y, GLsizei width, GLsizei height) override;
|
||||
virtual void gl_enable(GLenum) override;
|
||||
virtual void gl_disable(GLenum) override;
|
||||
virtual void gl_front_face(GLenum) override;
|
||||
virtual void gl_cull_face(GLenum) override;
|
||||
|
||||
private:
|
||||
GLenum m_current_draw_mode;
|
||||
|
@ -56,6 +60,10 @@ private:
|
|||
|
||||
GLenum m_error = GL_NO_ERROR;
|
||||
bool m_in_draw_state = 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