Create video_shader_driver_get_prev_textures

This commit is contained in:
twinaphex 2015-12-04 16:34:58 +01:00
parent a2da59ac9b
commit 6d37cfc2fb
3 changed files with 11 additions and 2 deletions

View File

@ -2576,7 +2576,7 @@ static void *gl_init(const video_info_t *video, const input_driver_t **input, vo
if (gl->shader)
{
unsigned minimum = gl->shader->get_prev_textures();
unsigned minimum = video_shader_driver_get_prev_textures(gl->shader);
gl->textures = max(minimum + 1, gl->textures);
}
@ -2823,7 +2823,7 @@ static bool gl_set_shader(void *data,
if (gl->shader)
{
unsigned textures = gl->shader->get_prev_textures() + 1;
unsigned textures = video_shader_driver_get_prev_textures(gl->shader) + 1;
if (textures > gl->textures) /* Have to reinit a bit. */
{

View File

@ -135,6 +135,13 @@ unsigned video_shader_driver_num_shaders(const shader_backend_t *shader)
return shader->num_shaders();
}
unsigned video_shader_driver_get_prev_textures(const shader_backend_t *shader)
{
if (!shader)
return 0;
return shader->get_prev_textures();
}
bool video_shader_driver_set_coords(const shader_backend_t *shader, const void *data)
{
if (!shader || !shader->set_coords)

View File

@ -132,6 +132,8 @@ bool video_shader_driver_set_coords(const shader_backend_t *shader, const void *
bool video_shader_driver_set_mvp(const shader_backend_t *shader, void *data, const math_matrix_4x4 *mat);
unsigned video_shader_driver_get_prev_textures(const shader_backend_t *shader);
#ifdef __cplusplus
}
#endif