https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_gl_spirv.txt
authorEleni Maria Stea <estea@igalia.com>
Sun, 4 Mar 2018 14:38:00 +0000 (16:38 +0200)
committerEleni Maria Stea <estea@igalia.com>
Sun, 4 Mar 2018 14:38:00 +0000 (16:38 +0200)
see 24: What about UniformBlockBinding and ShaderStorageBlockBinding?

removed UniformBlockBinding

main.c

diff --git a/main.c b/main.c
index 3f503bf..67f7e8c 100644 (file)
--- a/main.c
+++ b/main.c
@@ -103,8 +103,6 @@ int main(int argc, char **argv)
 
 int init(void)
 {
-       unsigned int uloc_matrix;
-
        glDebugMessageCallback(gldebug, 0);
        glEnable(GL_DEPTH_TEST);
        glEnable(GL_CULL_FACE);
@@ -147,8 +145,6 @@ int init(void)
        glGenBuffers(1, &ubo_matrix);
        glBindBuffer(GL_UNIFORM_BUFFER, ubo_matrix);
        glBufferData(GL_UNIFORM_BUFFER, sizeof matrix_state, &matrix_state, GL_STREAM_DRAW);
-       uloc_matrix = glGetUniformBlockIndex(sdr, "matrix_state");
-       glUniformBlockBinding(sdr, uloc_matrix, UBLOCK_MATRIX);
 
        return 0;
 }
@@ -200,7 +196,7 @@ void display(void)
        draw_mesh(&torus);
        glBindSampler(0, 0);
 
-       //assert(glGetError() == GL_NO_ERROR);
+       assert(glGetError() == GL_NO_ERROR);
        glutSwapBuffers();
 }