This commit is contained in:
Shane Smiskol 2025-06-25 00:02:51 -07:00
parent 21cc7ae736
commit 7cb7997741

View File

@ -278,12 +278,6 @@ static int init_egl () {
return -1;
}
EGLBoolean ok = eglSwapInterval(platform.egl.display, FLAG_VSYNC_HINT ? 1 : 0);
if (ok == EGL_FALSE) {
TRACELOG(LOG_WARNING, "COMMA: eglSwapInterval failed. Error code: %s", eglGetErrorString(eglGetError()));
return -1;
}
platform.egl.context = eglCreateContext(platform.egl.display, config, EGL_NO_CONTEXT, context_config);
if (platform.egl.context == EGL_NO_CONTEXT) {
TRACELOG(LOG_WARNING, "COMMA: Failed to create an OpenGL ES context. Error code: %s", eglGetErrorString(eglGetError()));
@ -295,6 +289,12 @@ static int init_egl () {
return -1;
}
EGLBoolean ok = eglSwapInterval(platform.egl.display, FLAG_VSYNC_HINT ? 1 : 0);
if (ok == EGL_FALSE) {
TRACELOG(LOG_WARNING, "COMMA: eglSwapInterval failed. Error code: %s", eglGetErrorString(eglGetError()));
return -1;
}
// enable depth testing. Not necessary if only doing 2D
glEnable(GL_DEPTH_TEST);