Cleanup: GPUShader: Remove GPU_shader_uniform_int/float

Simplify the API, leaving only one function to set uniform without the
uniform name.
This commit is contained in:
Clément Foucault
2023-02-12 23:28:06 +01:00
parent 173a8f4ac9
commit b68bac7ced
6 changed files with 12 additions and 26 deletions

View File

@@ -105,7 +105,8 @@ GPUShader *BlenderFallbackDisplayShader::bind(int width, int height)
/* Bind shader now to enable uniform assignment. */
GPU_shader_bind(shader_program_);
GPU_shader_uniform_int(shader_program_, image_texture_location_, 0);
float slot = 0;
GPU_shader_uniform_vector_int(shader_program_, image_texture_location_, 1, 1, &slot);
float size[2];
size[0] = width;
size[1] = height;