1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:17:44 +00:00

LibWeb/WebGL: Implement error handling and getError()

This commit is contained in:
Luke Wilde 2022-06-13 16:54:27 +01:00 committed by Linus Groh
parent 528c7bea03
commit a6617e1096
3 changed files with 39 additions and 0 deletions

View file

@ -46,6 +46,8 @@ public:
void front_face(GLenum mode);
GLenum get_error();
void polygon_offset(GLfloat factor, GLfloat units);
void scissor(GLint x, GLint y, GLsizei width, GLsizei height);
@ -81,7 +83,10 @@ private:
// - clear, drawArrays, or drawElements has been called while the drawing buffer is the currently bound framebuffer
bool m_should_present { true };
GLenum m_error { GL_NO_ERROR };
void needs_to_present();
void set_error(GLenum error);
};
}