diff --git a/gfx/drivers_context/cocoa_gl_ctx.m b/gfx/drivers_context/cocoa_gl_ctx.m index 8875bd8fb0..65899de61b 100644 --- a/gfx/drivers_context/cocoa_gl_ctx.m +++ b/gfx/drivers_context/cocoa_gl_ctx.m @@ -479,9 +479,15 @@ static bool cocoa_gl_gfx_ctx_set_video_mode(void *data, { cocoa_ctx_data_t *cocoa_ctx = (cocoa_ctx_data_t*)data; +#if defined(HAVE_OPENGLES3) if (cocoa_ctx->flags & COCOA_CTX_FLAG_USE_HW_CTX) g_hw_ctx = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES3]; g_ctx = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES3]; +#elif defined(HAVE_OPENGLES2) + if (cocoa_ctx->flags & COCOA_CTX_FLAG_USE_HW_CTX) + g_hw_ctx = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2]; + g_ctx = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2]; +#endif #ifdef OSX [g_ctx makeCurrentContext];