summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGL
diff options
context:
space:
mode:
authorJelle Raaijmakers <jelle@gmta.nl>2021-12-24 14:45:05 +0100
committerAndreas Kling <kling@serenityos.org>2021-12-27 11:58:43 +0100
commit9e9e1c7634d95bd77763bc5e76a9a8cb20d4fcb7 (patch)
tree222221e10a4d3eb19b2f2e842472de07d0bccc8c /Userland/Libraries/LibGL
parent3883b42764f8e6c33ad0fbf7b2bbd2e358c3a3ab (diff)
downloadserenity-9e9e1c7634d95bd77763bc5e76a9a8cb20d4fcb7.zip
LibGL: Implement `glColor3/4dv`
Diffstat (limited to 'Userland/Libraries/LibGL')
-rw-r--r--Userland/Libraries/LibGL/GL/gl.h2
-rw-r--r--Userland/Libraries/LibGL/GLColor.cpp10
2 files changed, 12 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGL/GL/gl.h b/Userland/Libraries/LibGL/GL/gl.h
index 43cc404295..a2b0d8163b 100644
--- a/Userland/Libraries/LibGL/GL/gl.h
+++ b/Userland/Libraries/LibGL/GL/gl.h
@@ -451,9 +451,11 @@ 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 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 glColor4dv(GLdouble const* v);
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);
diff --git a/Userland/Libraries/LibGL/GLColor.cpp b/Userland/Libraries/LibGL/GLColor.cpp
index 74bfee6e6f..f6eac96a64 100644
--- a/Userland/Libraries/LibGL/GLColor.cpp
+++ b/Userland/Libraries/LibGL/GLColor.cpp
@@ -10,6 +10,11 @@
extern GL::GLContext* g_gl_context;
+void glColor3dv(GLdouble const* v)
+{
+ g_gl_context->gl_color(v[0], v[1], v[2], 1.0);
+}
+
void glColor3f(GLfloat r, GLfloat g, GLfloat b)
{
g_gl_context->gl_color(r, g, b, 1.0);
@@ -25,6 +30,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 glColor4dv(GLdouble const* v)
+{
+ g_gl_context->gl_color(v[0], v[1], v[2], v[3]);
+}
+
void glColor4f(GLfloat r, GLfloat g, GLfloat b, GLfloat a)
{
g_gl_context->gl_color(r, g, b, a);