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

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

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