GPU: Rename GPU_shader_get_uniform to GPU_shader_get_uniform_ensure
[blender.git] / source / blender / gpu / intern / gpu_viewport.c
index 1dd3faa3b03a4feee6e20d474c2a46f13cf2d690..7a3d020fe361649453720bdbc4a43cf3ddc9a773 100644 (file)
@@ -536,9 +536,9 @@ void GPU_viewport_draw_to_screen(GPUViewport *viewport, const rcti *rect)
        GPU_shader_bind(shader);
 
        GPU_texture_bind(color, 0);
-       glUniform1i(GPU_shader_get_uniform(shader, "image"), 0);
-       glUniform4f(GPU_shader_get_uniform(shader, "rect_icon"), halfx, halfy, 1.0f + halfx, 1.0f + halfy);
-       glUniform4f(GPU_shader_get_uniform(shader, "rect_geom"), x1, y1, x2, y2);
+       glUniform1i(GPU_shader_get_uniform_ensure(shader, "image"), 0);
+       glUniform4f(GPU_shader_get_uniform_ensure(shader, "rect_icon"), halfx, halfy, 1.0f + halfx, 1.0f + halfy);
+       glUniform4f(GPU_shader_get_uniform_ensure(shader, "rect_geom"), x1, y1, x2, y2);
        glUniform4f(GPU_shader_get_builtin_uniform(shader, GPU_UNIFORM_COLOR), 1.0f, 1.0f, 1.0f, 1.0f);
 
        GPU_draw_primitive(GPU_PRIM_TRI_STRIP, 4);