protected override void PlatformSetConstantBuffer(int slot, ConstantBuffer cb) { OpenGLUniformBinding binding = ShaderResourceBindingSlots.GetUniformBindingForSlot(slot); if (binding.BlockLocation != -1) { BindUniformBlock(ShaderSet, slot, binding.BlockLocation, (OpenGLConstantBuffer)cb); } else { Debug.Assert(binding.StorageAdapter != null); SetUniformLocationDataSlow((OpenGLConstantBuffer)cb, binding.StorageAdapter); } }
protected override void PlatformSetConstantBuffer(int slot, ConstantBuffer cb) { OpenGLESUniformBinding binding = ShaderResourceBindingSlots.GetUniformBindingForSlot(slot); ((OpenGLESConstantBuffer)cb).BindToBlock(ShaderSet.ProgramID, binding.BlockLocation, ((OpenGLESConstantBuffer)cb).BufferSize, slot); //if (binding.BlockLocation != -1) //{ // BindUniformBlock(ShaderSet, slot, binding.BlockLocation, (OpenGLESConstantBuffer)cb); //} //else //{ // Debug.Assert(binding.StorageAdapter != null); // SetUniformLocationDataSlow((OpenGLESConstantBuffer)cb, binding.StorageAdapter); //} }