mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-23 08:00:20 +00:00
LibGL: Implement glColor3d
and glColor3ubv
This commit is contained in:
parent
a8537ad096
commit
a29534b531
Notes:
sideshowbarker
2024-07-17 21:11:14 +09:00
Author: https://github.com/gmta Commit: https://github.com/SerenityOS/serenity/commit/a29534b5316 Pull-request: https://github.com/SerenityOS/serenity/pull/11800 Reviewed-by: https://github.com/Quaker762 Reviewed-by: https://github.com/linusg Reviewed-by: https://github.com/sunverwerth ✅
2 changed files with 12 additions and 0 deletions
|
@ -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);
|
||||
|
|
|
@ -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]);
|
||||
|
|
Loading…
Reference in a new issue