- some fixes to the PP shader interface.

The binding point needs to be part of the ShaderUniforms class because Vulkan will need this value to generate the declaration in the shader source.
There's still one issue here: Since OpenGL has no local render state, the buffer must be bound every time it is used. Once the code is better abstracted this should be moved to a higher level class that knows all associated data and how to set it up.
This commit is contained in:
Christoph Oelckers 2018-06-12 21:43:35 +02:00
commit f166624eb2
23 changed files with 67 additions and 47 deletions

View file

@ -71,3 +71,14 @@ void GLUniformBuffer::SetData(const void *data)
glBufferData(GL_UNIFORM_BUFFER, mSize, data, mStaticDraw? GL_STATIC_DRAW : GL_STREAM_DRAW);
}
}
//==========================================================================
//
// This needs to go away later.
//
//==========================================================================
void GLUniformBuffer::Bind(int bindingpoint)
{
glBindBufferBase(GL_UNIFORM_BUFFER, bindingpoint, mBufferId);
}