mirror of
https://github.com/libretro/RetroArch
synced 2025-04-18 14:42:30 +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;
|
video_shader_ctx_init_t init_data;
|
||||||
enum rarch_shader_type type;
|
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
const char *shader_path = (settings->bools.video_shader_enable
|
const char *shader_path = (settings->bools.video_shader_enable
|
||||||
&& *settings->paths.path_shader) ? settings->paths.path_shader : NULL;
|
&& *settings->paths.path_shader) ? settings->paths.path_shader : NULL;
|
||||||
|
enum rarch_shader_type type = video_shader_parse_type(shader_path,
|
||||||
if (!gl)
|
|
||||||
{
|
|
||||||
RARCH_ERR("[GL]: Invalid GL instance passed.\n");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
type = video_shader_parse_type(shader_path,
|
|
||||||
gl->core_context_in_use
|
gl->core_context_in_use
|
||||||
? RARCH_SHADER_GLSL : DEFAULT_SHADER_TYPE);
|
? 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;
|
shader_info.set_active = true;
|
||||||
|
|
||||||
video_shader_driver_use(shader_info);
|
video_shader_driver_use(shader_info);
|
||||||
|
|
||||||
gl_set_viewport_wrapper(gl, width, height, false, true);
|
gl_set_viewport_wrapper(gl, width, height, false, true);
|
||||||
|
|
||||||
shader_info.data = gl;
|
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[14] = 1.0f;
|
||||||
color[15] = gl->menu_texture_alpha;
|
color[15] = gl->menu_texture_alpha;
|
||||||
|
|
||||||
if (!gl->menu_texture)
|
|
||||||
return;
|
|
||||||
|
|
||||||
gl->coords.vertex = vertexes_flipped;
|
gl->coords.vertex = vertexes_flipped;
|
||||||
gl->coords.tex_coord = tex_coords;
|
gl->coords.tex_coord = tex_coords;
|
||||||
gl->coords.color = color;
|
gl->coords.color = color;
|
||||||
|
|
||||||
glBindTexture(GL_TEXTURE_2D, gl->menu_texture);
|
glBindTexture(GL_TEXTURE_2D, gl->menu_texture);
|
||||||
|
|
||||||
video_info->cb_shader_use(gl,
|
video_info->cb_shader_use(gl,
|
||||||
@ -1148,7 +1139,7 @@ static bool gl_frame(void *data, const void *frame,
|
|||||||
{
|
{
|
||||||
menu_driver_frame(video_info);
|
menu_driver_frame(video_info);
|
||||||
|
|
||||||
if (gl->menu_texture_enable)
|
if (gl->menu_texture)
|
||||||
gl_draw_texture(gl, video_info);
|
gl_draw_texture(gl, video_info);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user