diff --git a/src/platforms/rcore_comma.c b/src/platforms/rcore_comma.c index c9b3934bf..453fbd1a9 100644 --- a/src/platforms/rcore_comma.c +++ b/src/platforms/rcore_comma.c @@ -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);