mirror of
https://github.com/overte-org/overte.git
synced 2025-04-17 11:20:42 +02:00
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:
parent
e6cdd4a9ff
commit
3c49e6231e
1 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue