medfall

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 7e315ef92aa9875939f8ec38e3485398bbd9dfe1
parent 60af370681aa2b444297b5994236baee7f0c430e
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Sat Nov  5 12:43:53 +0200

FATAL when we can't find a texture uniform

Diffstat:
renderer.cc | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/renderer.cc b/renderer.cc @@ -211,9 +211,10 @@ Shader renderer_new_shader( ShaderConfig config ) { for( size_t i = 0; i < RENDERER_MAX_TEXTURES; i++ ) { if( config.texture_uniform_names[ i ] != NULL ) { GLuint uniform = glGetUniformLocation( program, config.texture_uniform_names[ i ] ); - if( uniform != GLuint( -1 ) ) { - glUniform1i( uniform, i ); + if( uniform == GLuint( -1 ) ) { + FATAL( "couldn't find texture uniform: %s", config.texture_uniform_names[ i ] ); } + glUniform1i( uniform, i ); } } glUseProgram( 0 );