shithub: cstory

Download patch

ref: 1a5da443d715bb928436ea341ddfa9eee444918a
parent: 27eb7d178801ab3663fdc257f0437baf3e94ee2e
author: Gabriel Ravier <gabravier@gmail.com>
date: Sat Apr 11 20:54:30 EDT 2020

Backends/Rendering/OpenGL3: Fixed OpenGLES2 compile

Signed-off-by: Gabriel Ravier <gabravier@gmail.com>

--- a/src/Backends/Rendering/OpenGL3.cpp
+++ b/src/Backends/Rendering/OpenGL3.cpp
@@ -520,6 +520,8 @@
 	glDeleteTextures(1, &gl_texture_id);
 }
 
+#ifndef USE_OPENGLES2
+
 static const char *GetOpenGLErrorCodeDescription(GLenum error_code)
 {
 	switch (error_code)
@@ -570,6 +572,8 @@
 		Backend_PrintError("Error %d in %s: %s", error_code, name, GetOpenGLErrorCodeDescription(error_code));
 }
 
+#endif
+
 // ====================
 // Render-backend initialisation
 // ====================
@@ -576,7 +580,10 @@
 
 RenderBackend_Surface* RenderBackend_Init(const char *window_title, int screen_width, int screen_height, BOOL fullscreen)
 {
+#ifndef USE_OPENGLES2
 	glad_set_post_callback(PostGLCallCallback);
+#endif
+
 	actual_screen_width = screen_width;
 	actual_screen_height = screen_height;
 
--