Created
March 19, 2018 22:35
-
-
Save craftyguy/a4b934fe82b18202b8564cdc988796c7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 6b49ab452350148df4a2c362d8fdfb8f3356e43e Mon Sep 17 00:00:00 2001 | |
From: Clayton Craft <[email protected]> | |
Date: Mon, 19 Mar 2018 22:34:35 +0000 | |
Subject: [PATCH] Work around recursion issue with glMaterialfv | |
This works around an issue that seems to be related to how musl | |
is linking libraries, causing an infinite recursive loop to form | |
--- | |
src/gles/light.c | 8 ++++++-- | |
1 file changed, 6 insertions(+), 2 deletions(-) | |
diff --git a/src/gles/light.c b/src/gles/light.c | |
index fb1120a..139b91f 100644 | |
--- a/src/gles/light.c | |
+++ b/src/gles/light.c | |
@@ -5,13 +5,13 @@ void glMaterialf(GLenum face, GLenum pname, GLfloat param) { | |
glMaterialfv(face, pname, v); | |
} | |
-void glMaterialfv(GLenum face, GLenum pname, const GLfloat *v) { | |
+void glMaterialfv_tiny(GLenum face, GLenum pname, const GLfloat *v) { | |
GLContext *c = gl_get_context(); | |
int i; | |
GLMaterial *m; | |
if (face == GL_FRONT_AND_BACK) { | |
- glMaterialfv(GL_FRONT, pname, v); | |
+ glMaterialfv_tiny(GL_FRONT, pname, v); | |
face = GL_BACK; | |
} | |
if (face == GL_FRONT) m = &c->material.materials[0]; | |
@@ -49,6 +49,10 @@ void glMaterialfv(GLenum face, GLenum pname, const GLfloat *v) { | |
} | |
} | |
+void glMaterialfv(GLenum face, GLenum pname, const GLfloat *v) { | |
+ glMaterialfv_tiny(face, pname, v); | |
+} | |
+ | |
void glColorMaterial(GLenum face, GLenum mode) { | |
GLContext *c = gl_get_context(); | |
c->material.color.current_mode = face; | |
-- | |
2.16.2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment