Fix a lot of small errors/warnings
This commit is contained in:
@@ -57,7 +57,7 @@ namespace Nz
|
||||
{
|
||||
const GL::Context* context = GL::Context::GetCurrentContext();
|
||||
|
||||
for (const auto& command : m_commands)
|
||||
for (const auto& commandVariant : m_commands)
|
||||
{
|
||||
std::visit([&](auto&& command)
|
||||
{
|
||||
@@ -98,7 +98,7 @@ namespace Nz
|
||||
else
|
||||
static_assert(AlwaysFalse<T>::value, "non-exhaustive visitor");
|
||||
|
||||
}, command);
|
||||
}, commandVariant);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ namespace Nz
|
||||
|
||||
GLsizei stride = GLsizei(bufferData.declaration->GetStride());
|
||||
|
||||
for (const auto& componentInfo : *bufferData.declaration)
|
||||
for (const auto& componentInfo : bufferData.declaration->GetComponents())
|
||||
{
|
||||
auto& bufferAttribute = vaoSetup.vertexAttribs[locationIndex++].emplace();
|
||||
BuildAttrib(bufferAttribute, componentInfo.type);
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include <Nazara/OpenGLRenderer/OpenGLDevice.hpp>
|
||||
#include <Nazara/Renderer/CommandPool.hpp>
|
||||
#include <Nazara/OpenGLRenderer/OpenGLBuffer.hpp>
|
||||
#include <Nazara/OpenGLRenderer/OpenGLCommandPool.hpp>
|
||||
#include <Nazara/OpenGLRenderer/OpenGLRenderPipeline.hpp>
|
||||
#include <Nazara/OpenGLRenderer/OpenGLRenderPipelineLayout.hpp>
|
||||
#include <Nazara/OpenGLRenderer/OpenGLShaderStage.hpp>
|
||||
@@ -52,9 +53,9 @@ namespace Nz
|
||||
return std::make_unique<OpenGLBuffer>(*this, type);
|
||||
}
|
||||
|
||||
std::unique_ptr<CommandPool> OpenGLDevice::InstantiateCommandPool(QueueType queueType)
|
||||
std::unique_ptr<CommandPool> OpenGLDevice::InstantiateCommandPool(QueueType /*queueType*/)
|
||||
{
|
||||
return {};
|
||||
return std::make_unique<OpenGLCommandPool>(*this);
|
||||
}
|
||||
|
||||
std::unique_ptr<RenderPipeline> OpenGLDevice::InstantiateRenderPipeline(RenderPipelineInfo pipelineInfo)
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace Nz
|
||||
return true;
|
||||
}
|
||||
|
||||
std::unique_ptr<CommandPool> OpenGLRenderWindow::CreateCommandPool(QueueType queueType)
|
||||
std::unique_ptr<CommandPool> OpenGLRenderWindow::CreateCommandPool(QueueType /*queueType*/)
|
||||
{
|
||||
return std::make_unique<OpenGLCommandPool>();
|
||||
}
|
||||
|
||||
@@ -15,20 +15,17 @@ namespace Nz
|
||||
{
|
||||
void OpenGLShaderBinding::Apply(const GL::Context& context) const
|
||||
{
|
||||
std::size_t textureDescriptorCount = m_owner.GetTextureDescriptorCount();
|
||||
std::size_t uniformBufferDescriptorCount = m_owner.GetUniformBufferDescriptorCount();
|
||||
|
||||
for (std::size_t i = 0; i < textureDescriptorCount; ++i)
|
||||
for (std::size_t i = 0; i < m_owner.GetTextureDescriptorCount(); ++i)
|
||||
{
|
||||
const auto& textureDescriptor = m_owner.GetTextureDescriptor(m_poolIndex, m_bindingIndex, i);
|
||||
|
||||
UInt32 textureIndex = textureDescriptor.bindingIndex;
|
||||
|
||||
context.BindSampler(textureIndex, textureDescriptor.sampler);
|
||||
context.BindTexture(textureIndex, textureDescriptor.textureTarget, textureDescriptor.texture);
|
||||
context.BindTexture(textureIndex, textureDescriptor.textureTarget, textureDescriptor.texture);
|
||||
}
|
||||
|
||||
for (std::size_t i = 0; i < textureDescriptorCount; ++i)
|
||||
for (std::size_t i = 0; i < m_owner.GetUniformBufferDescriptorCount(); ++i)
|
||||
{
|
||||
const auto& uboDescriptor = m_owner.GetUniformBufferDescriptor(m_poolIndex, m_bindingIndex, i);
|
||||
|
||||
@@ -62,8 +59,8 @@ namespace Nz
|
||||
|
||||
const TextureBinding& texBinding = std::get<TextureBinding>(binding.content);
|
||||
|
||||
OpenGLTexture& glTexture = *static_cast<OpenGLTexture*>(texBinding.texture);
|
||||
OpenGLTextureSampler& glSampler = *static_cast<OpenGLTextureSampler*>(texBinding.sampler);
|
||||
OpenGLTexture& glTexture = static_cast<OpenGLTexture&>(*texBinding.texture);
|
||||
OpenGLTextureSampler& glSampler = static_cast<OpenGLTextureSampler&>(*texBinding.sampler);
|
||||
|
||||
auto& textureDescriptor = m_owner.GetTextureDescriptor(m_poolIndex, m_bindingIndex, resourceIndex);
|
||||
textureDescriptor.bindingIndex = binding.bindingIndex;
|
||||
|
||||
Reference in New Issue
Block a user