mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-27 10:10:57 +00:00
Turn video_shader_driver_set_parameter to macro
This commit is contained in:
parent
856d6b37be
commit
1b00796f64
@ -137,15 +137,6 @@ bool video_shader_driver_deinit(void)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool video_shader_driver_set_parameter(struct uniform_info *param)
|
||||
{
|
||||
if (!current_shader || !param)
|
||||
return false;
|
||||
current_shader->set_uniform_parameter(shader_data,
|
||||
param, NULL);
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Finds first suitable shader context driver. */
|
||||
bool video_shader_driver_init_first(void)
|
||||
{
|
||||
|
@ -277,7 +277,9 @@ bool video_shader_driver_direct_get_current_shader(video_shader_ctx_t *shader);
|
||||
|
||||
bool video_shader_driver_deinit(void);
|
||||
|
||||
bool video_shader_driver_set_parameter(struct uniform_info *param);
|
||||
#define video_shader_driver_set_parameter(param) \
|
||||
if (current_shader && current_shader->set_uniform_parameter) \
|
||||
current_shader->set_uniform_parameter(shader_data, ¶m, NULL)
|
||||
|
||||
#define video_shader_driver_set_parameters(params) \
|
||||
if (current_shader && current_shader->set_params) \
|
||||
|
@ -221,7 +221,7 @@ static void menu_display_d3d_draw_pipeline(void *data)
|
||||
uniform_param.lookup.ident = "time";
|
||||
uniform_param.result.f.v0 = t;
|
||||
|
||||
video_shader_driver_set_parameter(&uniform_param);
|
||||
video_shader_driver_set_parameter(uniform_param);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
@ -192,7 +192,7 @@ static void menu_display_gl_draw_pipeline(void *data)
|
||||
uniform_param.lookup.ident = "time";
|
||||
uniform_param.result.f.v0 = t;
|
||||
|
||||
video_shader_driver_set_parameter(&uniform_param);
|
||||
video_shader_driver_set_parameter(uniform_param);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user