mirror of
https://github.com/libretro/RetroArch
synced 2025-04-07 13:23:32 +00:00
Cleanup
This commit is contained in:
parent
360e2e54d3
commit
c0d8a2f093
@ -377,18 +377,10 @@ static bool gl_shader_init(gl_t *gl, const gfx_ctx_driver_t *ctx_driver,
|
||||
)
|
||||
{
|
||||
video_shader_ctx_init_t init_data;
|
||||
enum rarch_shader_type type;
|
||||
settings_t *settings = config_get_ptr();
|
||||
const char *shader_path = (settings->bools.video_shader_enable
|
||||
&& *settings->paths.path_shader) ? settings->paths.path_shader : NULL;
|
||||
|
||||
if (!gl)
|
||||
{
|
||||
RARCH_ERR("[GL]: Invalid GL instance passed.\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
type = video_shader_parse_type(shader_path,
|
||||
enum rarch_shader_type type = video_shader_parse_type(shader_path,
|
||||
gl->core_context_in_use
|
||||
? RARCH_SHADER_GLSL : DEFAULT_SHADER_TYPE);
|
||||
|
||||
@ -621,6 +613,7 @@ static INLINE void gl_set_shader_viewports(gl_t *gl)
|
||||
shader_info.set_active = true;
|
||||
|
||||
video_shader_driver_use(shader_info);
|
||||
|
||||
gl_set_viewport_wrapper(gl, width, height, false, true);
|
||||
|
||||
shader_info.data = gl;
|
||||
@ -931,12 +924,10 @@ static INLINE void gl_draw_texture(gl_t *gl, video_frame_info_t *video_info)
|
||||
color[14] = 1.0f;
|
||||
color[15] = gl->menu_texture_alpha;
|
||||
|
||||
if (!gl->menu_texture)
|
||||
return;
|
||||
|
||||
gl->coords.vertex = vertexes_flipped;
|
||||
gl->coords.tex_coord = tex_coords;
|
||||
gl->coords.color = color;
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D, gl->menu_texture);
|
||||
|
||||
video_info->cb_shader_use(gl,
|
||||
@ -1148,7 +1139,7 @@ static bool gl_frame(void *data, const void *frame,
|
||||
{
|
||||
menu_driver_frame(video_info);
|
||||
|
||||
if (gl->menu_texture_enable)
|
||||
if (gl->menu_texture)
|
||||
gl_draw_texture(gl, video_info);
|
||||
}
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user