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
Notes: sideshowbarker 2024-07-17 21:11:14 +09:00
2 changed files with 12 additions and 0 deletions

View file

@ -451,10 +451,12 @@ GLAPI void glClear(GLbitfield mask);
GLAPI void glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
GLAPI void glClearDepth(GLdouble depth);
GLAPI void glClearStencil(GLint s);
GLAPI void glColor3d(GLdouble r, GLdouble g, GLdouble b);
GLAPI void glColor3dv(GLdouble const* v);
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 glColor4dv(GLdouble const* v);
GLAPI void glColor4f(GLfloat r, GLfloat g, GLfloat b, GLfloat a);
GLAPI void glColor4fv(const GLfloat* v);

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