add callback uniform to metal

This commit is contained in:
patricejiang 2019-03-15 14:37:16 +08:00 committed by Arnold
parent 9f55e8ee7b
commit 7280457fbb
No known key found for this signature in database
GPG Key ID: 2008D1CC4BD1AE60
1 changed files with 7 additions and 0 deletions

View File

@ -385,6 +385,13 @@ void CommandBufferMTL::setUniformBuffer() const
{
if (_programState)
{
auto &callbackUniforms = _programState->getUniformCallbacks();
for(auto &cb : callbackUniforms)
{
cb.second(_programState, cb.first);
}
// Uniform buffer is bound to index 1.
const auto& vertexUniformBuffer = _renderPipelineMTL->getVertexUniformBuffer();
const auto& vertexUniformInfo = _programState->getVertexUniformInfos();