(PS3) Setting FBO mode ON (from initial OFF state) no longer requires

a restart
This commit is contained in:
twinaphex 2013-02-10 23:33:00 +01:00
parent 8b4390dd06
commit 7713754d26

View File

@ -566,16 +566,22 @@ void gl_init_fbo(void *data, unsigned width, unsigned height)
gl_t *gl = (gl_t*)data; gl_t *gl = (gl_t*)data;
// No need to use FBOs. // No need to use FBOs.
#ifndef RARCH_CONSOLE
/* we always want FBO to be at least initialized on startup for consoles */
if (!g_settings.video.render_to_texture && gl_shader_num_func(gl) == 0) if (!g_settings.video.render_to_texture && gl_shader_num_func(gl) == 0)
return; return;
#endif
struct gl_fbo_scale scale, scale_last; struct gl_fbo_scale scale, scale_last;
gl_shader_scale(gl, 1, &scale); gl_shader_scale(gl, 1, &scale);
gl_shader_scale(gl, gl_shader_num_func(gl), &scale_last); gl_shader_scale(gl, gl_shader_num_func(gl), &scale_last);
// No need to use FBOs. // No need to use FBOs.
#ifndef RARCH_CONSOLE
/* we always want FBO to be at least initialized on startup for consoles */
if (gl_shader_num_func(gl) == 1 && !scale.valid && !g_settings.video.render_to_texture) if (gl_shader_num_func(gl) == 1 && !scale.valid && !g_settings.video.render_to_texture)
return; return;
#endif
if (!load_fbo_proc(gl)) if (!load_fbo_proc(gl))
{ {
@ -1920,6 +1926,9 @@ static void gl_start(void)
#ifdef RARCH_CONSOLE #ifdef RARCH_CONSOLE
// Comes too early for console - moved to gl_start // Comes too early for console - moved to gl_start
gl->font_ctx = gl_font_init_first(gl, g_settings.video.font_path, g_settings.video.font_size); gl->font_ctx = gl_font_init_first(gl, g_settings.video.font_path, g_settings.video.font_size);
if (!g_settings.video.render_to_texture)
gl_deinit_fbo(gl);
#endif #endif
context_get_available_resolutions_func(); context_get_available_resolutions_func();