mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01: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);
|
GLuint bo = getBufferID(*uniformBuffer);
|
||||||
glBindBufferRange(GL_UNIFORM_BUFFER, slot, bo, rangeStart, rangeSize);
|
glBindBufferRange(GL_UNIFORM_BUFFER, slot, bo, rangeStart, rangeSize);
|
||||||
#else
|
#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);
|
GLfloat* data = (GLfloat*) (uniformBuffer->getData() + rangeStart);
|
||||||
glUniform4fv(slot, rangeSize / sizeof(GLfloat[4]), data);
|
glUniform4fv(slot, rangeSize / sizeof(GLfloat[4]), data);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue