You should therefore NEVER use the same index to bind two different blocks in the same frame - there's simply no need.
e.g
static int lastBindingIndex=21; if(lastBindingIndex>=GL_MAX_UNIFORM_BUFFER_BINDINGS) lastBindingIndex=1; bindingIndex=lastBindingIndex; lastBindingIndex++; glUniformBlockBinding(program,indexInShader,bindingIndex);
No comments:
Post a Comment