summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGL/GLLights.cpp
diff options
context:
space:
mode:
authorStephan Unverwerth <s.unverwerth@gmx.de>2021-05-16 14:05:13 +0200
committerAndreas Kling <kling@serenityos.org>2021-05-16 15:53:58 +0200
commitda57563c1cc27790417eac55b99e0d52da8528c9 (patch)
treef53ab4a0607e13928ee7e6ce8daf6a669bb8242b /Userland/Libraries/LibGL/GLLights.cpp
parent26953c2be13614cd2aaa59233c6b324f3bb34131 (diff)
downloadserenity-da57563c1cc27790417eac55b99e0d52da8528c9.zip
LibGL: Implement glShadeModel()
This turns off interpolation of vertex colors when GL_FLAT is selected.
Diffstat (limited to 'Userland/Libraries/LibGL/GLLights.cpp')
-rw-r--r--Userland/Libraries/LibGL/GLLights.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGL/GLLights.cpp b/Userland/Libraries/LibGL/GLLights.cpp
new file mode 100644
index 0000000000..afd1c746d1
--- /dev/null
+++ b/Userland/Libraries/LibGL/GLLights.cpp
@@ -0,0 +1,15 @@
+/*
+ * Copyright (c) 2021, Stephan Unverwerth <s.unverwerth@gmx.de>
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+#include "GL/gl.h"
+#include "GLContext.h"
+
+extern GL::GLContext* g_gl_context;
+
+void glShadeModel(GLenum mode)
+{
+ g_gl_context->gl_shade_model(mode);
+}