Skip to content

Instantly share code, notes, and snippets.

@Borgleader
Created September 19, 2015 15:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Borgleader/75869079be9d876a333d to your computer and use it in GitHub Desktop.
Save Borgleader/75869079be9d876a333d to your computer and use it in GitHub Desktop.
// vs.glsl
layout (binding = 1, std140) uniform Matrices
{
mat4 modelViewProjMat;
};
layout (binding = 0) uniform Foo
{
vec3 bar;
};
// main.cpp
GLuint idx = gl::GetUniformBlockIndex(llogl::get_id(basicShaderVsProg), "Matrices");
idx -> 1
// vs.glsl
layout (binding = 1, std140) uniform Matrices
{
mat4 modelViewProjMat;
};
// main.cpp
GLuint idx = gl::GetUniformBlockIndex(llogl::get_id(basicShaderVsProg), "Matrices");
idx -> 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment