diff options
author | Jesse Buhagiar <jooster669@gmail.com> | 2022-01-21 10:16:17 +1100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-01-26 16:44:11 +0100 |
commit | 909ec41196349706dfefdbda11313ee0a7673b2d (patch) | |
tree | 88cc2a39b02cd31294f7e8c30387898bb5c9b4a0 /Userland/Libraries/LibGL | |
parent | 68e50759b4b85f82b3b1a7289e97518c7437ce99 (diff) | |
download | serenity-909ec41196349706dfefdbda11313ee0a7673b2d.zip |
LibGL: Implement `glLightModeliv`
Diffstat (limited to 'Userland/Libraries/LibGL')
-rw-r--r-- | Userland/Libraries/LibGL/GL/gl.h | 1 | ||||
-rw-r--r-- | Userland/Libraries/LibGL/GLLights.cpp | 12 |
2 files changed, 13 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGL/GL/gl.h b/Userland/Libraries/LibGL/GL/gl.h index 2c15a30ffe..a178b88f78 100644 --- a/Userland/Libraries/LibGL/GL/gl.h +++ b/Userland/Libraries/LibGL/GL/gl.h @@ -616,6 +616,7 @@ GLAPI void glLightfv(GLenum light, GLenum pname, GLfloat const* param); GLAPI void glLightModelf(GLenum pname, GLfloat param); GLAPI void glLightModelfv(GLenum pname, GLfloat const* params); GLAPI void glLightModeli(GLenum pname, GLint param); +GLAPI void glLightModeliv(GLenum pname, GLint const* params); GLAPI void glStencilFunc(GLenum func, GLint ref, GLuint mask); GLAPI void glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask); GLAPI void glStencilMask(GLuint mask); diff --git a/Userland/Libraries/LibGL/GLLights.cpp b/Userland/Libraries/LibGL/GLLights.cpp index 78b9050019..cb80bc8590 100644 --- a/Userland/Libraries/LibGL/GLLights.cpp +++ b/Userland/Libraries/LibGL/GLLights.cpp @@ -43,6 +43,18 @@ void glLightModelfv(GLenum pname, GLfloat const* params) } } +void glLightModeliv(GLenum pname, GLint const* params) +{ + switch (pname) { + case GL_LIGHT_MODEL_AMBIENT: + g_gl_context->gl_light_model(pname, params[0], params[1], params[2], params[3]); + break; + default: + g_gl_context->gl_light_model(pname, params[0], 0.0f, 0.0f, 0.0f); + break; + } +} + void glLightModeli(GLenum pname, GLint param) { g_gl_context->gl_light_model(pname, param, 0.0f, 0.0f, 0.0f); |