LibGL: Implement glColor3ub

This commit is contained in:
Jelle Raaijmakers 2021-12-01 13:37:51 +01:00 committed by Andreas Kling
parent d38c4ac8b5
commit 315973e73c
2 changed files with 8 additions and 1 deletions

View file

@ -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);

View file

@ -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)