From 3c49e6231e8fa7f1ea671dc7cf07ea686562cf4c Mon Sep 17 00:00:00 2001 From: Atlante45 Date: Fri, 26 Jun 2015 13:56:59 -0700 Subject: [PATCH] Sam's fix for pipeline edge case Basically if we bind a uniform texture and the pipeline is not setup correctly on mac --- libraries/gpu/src/gpu/GLBackendPipeline.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libraries/gpu/src/gpu/GLBackendPipeline.cpp b/libraries/gpu/src/gpu/GLBackendPipeline.cpp index f4449e9ea1..06d9eadd87 100755 --- a/libraries/gpu/src/gpu/GLBackendPipeline.cpp +++ b/libraries/gpu/src/gpu/GLBackendPipeline.cpp @@ -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);