summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelle Raaijmakers <jelle@gmta.nl>2022-08-24 15:29:11 +0200
committerAndreas Kling <kling@serenityos.org>2022-08-27 12:28:05 +0200
commitd7cfdfe6335de83f25d205cd9863fc18e2854763 (patch)
tree636878c715689f9d82010a34f27854b0993857bd
parent73f7f4656cce635692ea37b0421556cdd7200306 (diff)
downloadserenity-d7cfdfe6335de83f25d205cd9863fc18e2854763.zip
LibGL: Implement `GL_NORMAL_ARRAY_TYPE` context parameter
This is used by the Grim/Monkey4 engine in ScummVM.
-rw-r--r--Userland/Libraries/LibGL/ContextParameter.cpp2
-rw-r--r--Userland/Libraries/LibGL/GL/gl.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGL/ContextParameter.cpp b/Userland/Libraries/LibGL/ContextParameter.cpp
index 79c7d6ee12..83a0326f29 100644
--- a/Userland/Libraries/LibGL/ContextParameter.cpp
+++ b/Userland/Libraries/LibGL/ContextParameter.cpp
@@ -66,6 +66,8 @@ Optional<ContextParameter> GLContext::get_context_parameter(GLenum name)
return ContextParameter { .type = GL_INT, .value = { .integer_value = TEXTURE_MATRIX_STACK_LIMIT } };
case GL_MAX_TEXTURE_UNITS:
return ContextParameter { .type = GL_INT, .value = { .integer_value = static_cast<GLint>(m_texture_units.size()) } };
+ case GL_NORMAL_ARRAY_TYPE:
+ return ContextParameter { .type = GL_INT, .value = { .integer_value = GL_FLOAT } };
case GL_NORMALIZE:
return ContextParameter { .type = GL_BOOL, .is_capability = true, .value = { .boolean_value = m_normalize } };
case GL_PACK_ALIGNMENT:
diff --git a/Userland/Libraries/LibGL/GL/gl.h b/Userland/Libraries/LibGL/GL/gl.h
index 73c93f97dd..55bef5aafd 100644
--- a/Userland/Libraries/LibGL/GL/gl.h
+++ b/Userland/Libraries/LibGL/GL/gl.h
@@ -140,6 +140,7 @@ extern "C" {
#define GL_MAP2_VERTEX_3 0x0DB7
#define GL_MAP2_VERTEX_4 0x0DB8
#define GL_NORMAL_ARRAY 0x8075
+#define GL_NORMAL_ARRAY_TYPE 0x807E
// Blend factors
#define GL_ZERO 0