medfall

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

commit b2d833c18fa917f55c2988d45f16a27b342bf457
parent 0f5f6ebf2e4e192578ea94a3f215bff7d2edeabc
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Sun Jan 15 12:08:28 +0200

We are never going to use geometry shaders

Diffstat:
renderer.cc | 11-----------
renderer.h | 1-
2 files changed, 0 insertions(+), 12 deletions(-)
diff --git a/renderer.cc b/renderer.cc @@ -169,18 +169,10 @@ Shader renderer_new_shader( ShaderConfig config ) { GLuint vs = new_gl_shader( GL_VERTEX_SHADER, config.vertex_src ); GLuint fs = new_gl_shader( GL_FRAGMENT_SHADER, config.fragment_src ); - GLuint gs = 0; - - if( config.geometry_src != NULL ) { - gs = new_gl_shader( GL_GEOMETRY_SHADER, config.geometry_src ); - } GLuint program = glCreateProgram(); glAttachShader( program, vs ); glAttachShader( program, fs ); - if( gs != 0 ) { - glAttachShader( program, gs ); - } glBindAttribLocation( program, ATTR_POSITION, "position" ); glBindAttribLocation( program, ATTR_NORMAL, "normal" ); @@ -197,9 +189,6 @@ Shader renderer_new_shader( ShaderConfig config ) { glDeleteShader( vs ); glDeleteShader( fs ); - if( gs != 0 ) { - glDeleteShader( gs ); - } GLint status; glGetProgramiv( program, GL_LINK_STATUS, &status ); diff --git a/renderer.h b/renderer.h @@ -125,7 +125,6 @@ struct MeshConfig { struct ShaderConfig { const char * vertex_src = NULL; const char * fragment_src = NULL; - const char * geometry_src = NULL; const char * texture_uniform_names[ RENDERER_MAX_TEXTURES ] = { }; const char * texture_buffer_uniform_names[ RENDERER_MAX_TEXTURE_BUFFERS ] = { }; };