Пример #1
0
void gl_shader_use(unsigned index)
{
#ifdef HAVE_CG
   gl_cg_use(index);
#endif

#ifdef HAVE_XML
   gl_glsl_use(index);
#endif
}
Пример #2
0
static bool gfx_ctx_orientation_update(void)
{
   gl_t *gl = (gl_t*)driver.video_data;

   // Get real known video size, which might have been altered by context.
   gfx_ctx_get_video_size(&gl->win_width, &gl->win_height);
   RARCH_LOG("GL: Using resolution %ux%u\n", gl->win_width, gl->win_height);

   if (gl->full_x || gl->full_y) // We got bogus from gfx_ctx_get_video_size. Replace.
   {
      gl->full_x = gl->win_width;
      gl->full_y = gl->win_height;
   }

#ifdef HAVE_GLSL
   gl_glsl_use(0);
#endif
   gl_set_viewport(gl, gl->win_width, gl->win_height, false, true);
#ifdef HAVE_GLSL
   gl_glsl_use(1);
#endif
   gl_set_viewport(gl, gl->win_width, gl->win_height, false, true);
}