mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 21:27:36 +00:00
LibGL: Implement glGetError and underlying function
This implements `glGetError` and correctly sets the state machine's error macro (similar to LibC `errno`) when an invalid operation is performed. This is reset on completion of a successful operation.
This commit is contained in:
parent
4807d32139
commit
e537e2690a
5 changed files with 58 additions and 4 deletions
|
@ -37,6 +37,14 @@ extern "C" {
|
|||
#define GL_RENDERER 0x1F01
|
||||
#define GL_VERSION 0x1F02
|
||||
|
||||
// Error codes
|
||||
#define GL_NO_ERROR 0
|
||||
#define GL_INVALID_ENUM 0x500
|
||||
#define GL_INVALID_VALUE 0x501
|
||||
#define GL_INVALID_OPERATION 0x502
|
||||
#define GL_INVALID_FRAMEBUFFER_OPERATION 0x503
|
||||
#define GL_OUT_OF_MEMORY 0x504
|
||||
|
||||
//
|
||||
// OpenGL typedefs
|
||||
//
|
||||
|
@ -66,6 +74,7 @@ GLAPI void glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf al
|
|||
GLAPI void glColor3f(GLfloat r, GLfloat g, GLfloat b);
|
||||
GLAPI void glEnd();
|
||||
GLAPI void glFrustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble nearVal, GLdouble farVal);
|
||||
GLAPI GLenum glGetError();
|
||||
GLAPI GLubyte* glGetString(GLenum name);
|
||||
GLAPI void glLoadIdentity();
|
||||
GLAPI void glMatrixMode(GLenum mode);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue