diff --git a/Userland/Libraries/LibGL/GL/gl.h b/Userland/Libraries/LibGL/GL/gl.h index 14e001ec5e..db7c904f7f 100644 --- a/Userland/Libraries/LibGL/GL/gl.h +++ b/Userland/Libraries/LibGL/GL/gl.h @@ -481,6 +481,7 @@ 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 glColor3ubv(GLubyte const* v); +GLAPI void glColor4b(GLbyte r, GLbyte g, GLbyte b, GLbyte a); GLAPI void glColor4dv(GLdouble const* v); GLAPI void glColor4f(GLfloat r, GLfloat g, GLfloat b, GLfloat a); GLAPI void glColor4fv(const GLfloat* v); diff --git a/Userland/Libraries/LibGL/GLColor.cpp b/Userland/Libraries/LibGL/GLColor.cpp index c620f01440..f1b68341a9 100644 --- a/Userland/Libraries/LibGL/GLColor.cpp +++ b/Userland/Libraries/LibGL/GLColor.cpp @@ -37,7 +37,12 @@ void glColor3ub(GLubyte r, GLubyte g, GLubyte b) void glColor3ubv(GLubyte const* v) { - g_gl_context->gl_color(v[0] / 255.0f, v[1] / 255.0f, v[2] / 255.0f, 1.0); + g_gl_context->gl_color(v[0] / 255.0, v[1] / 255.0, v[2] / 255.0, 1.0); +} + +void glColor4b(GLbyte r, GLbyte g, GLbyte b, GLbyte a) +{ + g_gl_context->gl_color(r / 255.0, g / 255.0, b / 255.0, a / 255.0); } void glColor4dv(GLdouble const* v) @@ -62,5 +67,5 @@ void glColor4ub(GLubyte r, GLubyte g, GLubyte b, GLubyte a) void glColor4ubv(const GLubyte* v) { - g_gl_context->gl_color(v[0] / 255.0f, v[1] / 255.0f, v[2] / 255.0f, v[3] / 255.0f); + g_gl_context->gl_color(v[0] / 255.0, v[1] / 255.0, v[2] / 255.0, v[3] / 255.0); }