diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c index 2254344217..23d9665e47 100644 --- a/gfx/drivers/gl.c +++ b/gfx/drivers/gl.c @@ -260,12 +260,14 @@ static bool gl_shader_init(gl_t *gl) } #ifdef HAVE_GLSL - if (gl->core_context && RARCH_SHADER_CG) +#ifdef HAVE_CG + if (gl->core_context && backend == &gl_cg_backend) { RARCH_ERR("[GL]: Cg cannot be used with core GL context. Falling back to GLSL.\n"); backend = &gl_glsl_backend; shader_path = NULL; } +#endif #endif gl->shader = backend; diff --git a/gfx/video_shader_driver.c b/gfx/video_shader_driver.c index 2276f30402..48ce91e630 100644 --- a/gfx/video_shader_driver.c +++ b/gfx/video_shader_driver.c @@ -18,12 +18,12 @@ #include static const shader_backend_t *shader_ctx_drivers[] = { -#ifdef HAVE_CG - &gl_cg_backend, -#endif #ifdef HAVE_GLSL &gl_glsl_backend, #endif +#ifdef HAVE_CG + &gl_cg_backend, +#endif #ifdef HAVE_HLSL &hlsl_backend, #endif