return target;
}
-void TestGraphicsBuffer::BindAsUniformBuffer(const TestGraphicsProgram* program) const
+void TestGraphicsBuffer::BindAsUniformBuffer(const TestGraphicsProgram* program, const Dali::UniformBufferBindingDescriptor& uboBinding) const
{
auto* reflection = static_cast<const TestGraphicsReflection*>(&program->GetReflection());
Graphics::UniformBlockInfo uboInfo{};
reflection->GetUniformBlock(0, uboInfo);
- auto* data = memory.data();
+ auto offset = uboBinding.offset;
+ auto* data = memory.data() + offset;
for(const auto& member : uboInfo.members)
{
namespace Dali
{
class TestGraphicsProgram;
+class UniformBufferBindingDescriptor;
class TestGraphicsBuffer : public Graphics::Buffer
{
public:
return true;
}
- void BindAsUniformBuffer(const TestGraphicsProgram* program) const;
+ void BindAsUniformBuffer(const TestGraphicsProgram* program, const Dali::UniformBufferBindingDescriptor& uboBinding) const;
TraceCallStack& mCallStack;
TestGlAbstraction& mGl;
auto buffer = bindings.standaloneUniformsBufferBinding;
// based on reflection, issue gl calls
- buffer.buffer->BindAsUniformBuffer(static_cast<const TestGraphicsProgram*>(currentPipeline->programState.program));
+ buffer.buffer->BindAsUniformBuffer(static_cast<const TestGraphicsProgram*>(currentPipeline->programState.program), bindings.standaloneUniformsBufferBinding);
break;
}
case CommandType::BIND_SAMPLERS: