commit 85c40ffb53dbb9c0aae0e7da15154b973fde6a6e parent f6b52f3bf1a83cf5431a7bf4bda76ff6403aa24a Author: Michael Savage <mikejsavage@gmail.com> Date: Sun Oct 30 21:02:40 +0200 Note to self Diffstat:
renderer.cc | | | 4 | +++- |
diff --git a/renderer.cc b/renderer.cc @@ -257,7 +257,9 @@ void renderer_draw_mesh( const Mesh & mesh, RenderState state ) { glUseProgram( state.shader ); glBindVertexArray( mesh.vao ); // TODO: don't hardcode 0! - glBindBufferBase( GL_UNIFORM_BUFFER, 0, state.ubs[ 0 ] ); + // GLuint ubo_index = glGetUniformBlockIndex( shaderA.Program, "uniforms" ); + GLuint ubo_index = 0; + glBindBufferBase( GL_UNIFORM_BUFFER, ubo_index, state.ubs[ 0 ] ); // TODO: set depth func, bind textures, etc GLenum primitive = primitivetype_to_glenum( mesh.primitive_type );