summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGL/GL
diff options
context:
space:
mode:
authorJelle Raaijmakers <jelle@gmta.nl>2022-01-13 03:03:35 +0100
committerAndreas Kling <kling@serenityos.org>2022-01-13 12:13:58 +0100
commit8e935ad3b1fe87e1623490c000d68e3c14702d3e (patch)
tree83c0831b1556fe0ea69a07f3870b2db7b3a06da4 /Userland/Libraries/LibGL/GL
parent9d4c2f630894fe480700028be37747c04c4d0b24 (diff)
downloadserenity-8e935ad3b1fe87e1623490c000d68e3c14702d3e.zip
LibGL+LibSoftGPU: Implement `glColorMaterial` and `GL_COLOR_MATERIAL`
When `GL_COLOR_MATERIAL` is enabled, specific material parameters can be overwritten by the current color per-vertex during the lighting calculations. Which parameter is controlled by `glColorMaterial`. Also move the lighting calculations _before_ clipping, because the spec says so. As a result, we interpolate the resulting vertex color instead of the input color.
Diffstat (limited to 'Userland/Libraries/LibGL/GL')
-rw-r--r--Userland/Libraries/LibGL/GL/gl.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGL/GL/gl.h b/Userland/Libraries/LibGL/GL/gl.h
index 04e850b2d4..3a6f9a16a6 100644
--- a/Userland/Libraries/LibGL/GL/gl.h
+++ b/Userland/Libraries/LibGL/GL/gl.h
@@ -93,6 +93,8 @@ extern "C" {
#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
// Get parameters
+#define GL_COLOR_MATERIAL_FACE 0x0B55
+#define GL_COLOR_MATERIAL_MODE 0x0B56
#define GL_COLOR_MATERIAL 0x0B57
#define GL_FOG_START 0x0B63
#define GL_FOG_END 0x0B64