Backends/Rendering/OpenGL3: Fixed OpenGLES2 compile

Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
This commit is contained in:
Gabriel Ravier 2020-04-12 00:54:30 +02:00
parent 27eb7d1788
commit 1a5da443d7

View file

@ -520,6 +520,8 @@ static void GlyphBatch_DestroyTexture(SPRITEBATCH_U64 texture_id, void *udata)
glDeleteTextures(1, &gl_texture_id);
}
#ifndef USE_OPENGLES2
static const char *GetOpenGLErrorCodeDescription(GLenum error_code)
{
switch (error_code)
@ -570,13 +572,18 @@ static void PostGLCallCallback(const char *name, void *function_pointer, int len
Backend_PrintError("Error %d in %s: %s", error_code, name, GetOpenGLErrorCodeDescription(error_code));
}
#endif
// ====================
// Render-backend initialisation
// ====================
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;