Should hopefully fix Reicast issues

This commit is contained in:
twinaphex 2018-10-08 15:38:25 +02:00
parent 22dafd6251
commit 509ecab3fe
1 changed files with 26 additions and 20 deletions

View File

@ -1780,6 +1780,11 @@ static void *gl_init(const video_info_t *video,
hwr = video_driver_get_hw_context();
if (hwr)
{
hwr->version_major = gl->version_major;
hwr->version_minor = gl->version_minor;
if (hwr->context_type == RETRO_HW_CONTEXT_OPENGL_CORE)
{
gfx_ctx_flags_t flags;
@ -1802,6 +1807,7 @@ static void *gl_init(const video_info_t *video,
goto error;
}
}
}
if (!renderchain_gl_init_first(&gl->renderchain_driver,
&gl->renderchain_data))
@ -1813,7 +1819,7 @@ static void *gl_init(const video_info_t *video,
if (gl->renderchain_driver->restore_default_state)
gl->renderchain_driver->restore_default_state(gl, gl->renderchain_data);
if (hwr->context_type == RETRO_HW_CONTEXT_OPENGL_CORE)
if (hwr && hwr->context_type == RETRO_HW_CONTEXT_OPENGL_CORE)
if (gl->renderchain_driver->new_vao)
gl->renderchain_driver->new_vao(gl, gl->renderchain_data);
@ -1823,7 +1829,7 @@ static void *gl_init(const video_info_t *video,
gl->hw_render_use = false;
gl->has_fbo = gl_check_capability(GL_CAPS_FBO);
if (gl->has_fbo && hwr->context_type != RETRO_HW_CONTEXT_NONE)
if (gl->has_fbo && hwr && hwr->context_type != RETRO_HW_CONTEXT_NONE)
gl->hw_render_use = true;
if (!resolve_extensions(gl, ctx_driver->ident, video))
@ -1855,7 +1861,7 @@ static void *gl_init(const video_info_t *video,
RARCH_LOG("[GL]: Using resolution %ux%u\n", temp_width, temp_height);
gl->vertex_ptr = hwr->bottom_left_origin
gl->vertex_ptr = (hwr && hwr->bottom_left_origin)
? vertexes : vertexes_flipped;
/* Better pipelining with GPU due to synchronous glSubTexImage.