Graphics: Add support for draw call data (texture overlay)

This commit is contained in:
Jérôme Leclercq
2021-09-05 18:26:12 +02:00
parent 26e5a41dce
commit abdcd63058
16 changed files with 160 additions and 18 deletions

View File

@@ -68,11 +68,11 @@ namespace Nz
{
auto& textureDescriptor = m_owner.GetTextureDescriptor(m_poolIndex, m_bindingIndex, binding.bindingIndex);
if (OpenGLTexture* glTexture = static_cast<OpenGLTexture*>(arg.texture))
if (const OpenGLTexture* glTexture = static_cast<const OpenGLTexture*>(arg.texture))
{
textureDescriptor.texture = glTexture->GetTexture().GetObjectId();
if (OpenGLTextureSampler* glSampler = static_cast<OpenGLTextureSampler*>(arg.sampler))
if (const OpenGLTextureSampler* glSampler = static_cast<const OpenGLTextureSampler*>(arg.sampler))
textureDescriptor.sampler = glSampler->GetSampler(glTexture->GetLevelCount() > 1).GetObjectId();
else
textureDescriptor.sampler = 0;