Turn video_shader_driver_set_parameter to macro

This commit is contained in:
twinaphex 2016-11-20 17:28:51 +01:00
parent 856d6b37be
commit 1b00796f64
4 changed files with 5 additions and 12 deletions

View File

@ -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)
{

View File

@ -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, &param, NULL)
#define video_shader_driver_set_parameters(params) \
if (current_shader && current_shader->set_params) \

View File

@ -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

View File

@ -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;
}