1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:28:11 +00:00

LibGL: Implement glColor3d and glColor3ubv

This commit is contained in:
Jelle Raaijmakers 2022-01-10 02:07:07 +01:00 committed by Linus Groh
parent a8537ad096
commit a29534b531
2 changed files with 12 additions and 0 deletions

View file

@ -10,6 +10,11 @@
extern GL::GLContext* g_gl_context;
void glColor3d(GLdouble r, GLdouble g, GLdouble b)
{
g_gl_context->gl_color(r, g, b, 1.0);
}
void glColor3dv(GLdouble const* v)
{
g_gl_context->gl_color(v[0], v[1], v[2], 1.0);
@ -30,6 +35,11 @@ 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 glColor3ubv(GLubyte const* v)
{
g_gl_context->gl_color(v[0] / 255.0f, v[1] / 255.0f, v[2] / 255.0f, 1.0);
}
void glColor4dv(GLdouble const* v)
{
g_gl_context->gl_color(v[0], v[1], v[2], v[3]);