Sam's fix for pipeline edge case

Basically if we bind a uniform texture and the pipeline is not setup
correctly on mac
This commit is contained in:
Atlante45 2015-06-26 13:56:59 -07:00
parent e6cdd4a9ff
commit 3c49e6231e

View file

@ -160,6 +160,10 @@ void GLBackend::do_setUniformBuffer(Batch& batch, uint32 paramOffset) {
GLuint bo = getBufferID(*uniformBuffer);
glBindBufferRange(GL_UNIFORM_BUFFER, slot, bo, rangeStart, rangeSize);
#else
// because we rely on the program uniform mechanism we need to have
// the program bound, thank you MacOSX Legacy profile.
updatePipeline();
GLfloat* data = (GLfloat*) (uniformBuffer->getData() + rangeStart);
glUniform4fv(slot, rangeSize / sizeof(GLfloat[4]), data);