diff --git a/Userland/Libraries/LibGL/GL/gl.h b/Userland/Libraries/LibGL/GL/gl.h index 23f7e1bd9a..caeb585e6b 100644 --- a/Userland/Libraries/LibGL/GL/gl.h +++ b/Userland/Libraries/LibGL/GL/gl.h @@ -334,6 +334,7 @@ GLAPI void glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf al GLAPI void glClearDepth(GLdouble depth); GLAPI void glColor3f(GLfloat r, GLfloat g, GLfloat b); GLAPI void glColor3fv(const GLfloat* v); +GLAPI void glColor3ub(GLubyte r, GLubyte g, GLubyte b); GLAPI void glColor4f(GLfloat r, GLfloat g, GLfloat b, GLfloat a); GLAPI void glColor4fv(const GLfloat* v); GLAPI void glColor4ub(GLubyte r, GLubyte g, GLubyte b, GLubyte a); diff --git a/Userland/Libraries/LibGL/GLColor.cpp b/Userland/Libraries/LibGL/GLColor.cpp index f440f4dc6a..74bfee6e6f 100644 --- a/Userland/Libraries/LibGL/GLColor.cpp +++ b/Userland/Libraries/LibGL/GLColor.cpp @@ -14,11 +14,17 @@ void glColor3f(GLfloat r, GLfloat g, GLfloat b) { g_gl_context->gl_color(r, g, b, 1.0); } + void glColor3fv(const GLfloat* v) { g_gl_context->gl_color(v[0], v[1], v[2], 1.0); } +void glColor3ub(GLubyte r, GLubyte g, GLubyte b) +{ + g_gl_context->gl_color(r / 255.0, g / 255.0, b / 255.0, 1.0); +} + void glColor4f(GLfloat r, GLfloat g, GLfloat b, GLfloat a) { g_gl_context->gl_color(r, g, b, a); @@ -31,7 +37,7 @@ void glColor4fv(const GLfloat* v) void glColor4ub(GLubyte r, GLubyte g, GLubyte b, GLubyte a) { - g_gl_context->gl_color(r / 255.0f, g / 255.0f, b / 255.0f, a / 255.0f); + g_gl_context->gl_color(r / 255.0, g / 255.0, b / 255.0, a / 255.0); } void glColor4ubv(const GLubyte* v)