Minor fixes

This commit is contained in:
Jérôme Leclercq 2021-05-02 13:58:56 +02:00
parent 55c2dd8485
commit 990193ebb4
3 changed files with 4 additions and 6 deletions

View File

@ -39,8 +39,8 @@ namespace Nz
*/ */
void ParameterList::Clear() void ParameterList::Clear()
{ {
for (auto it = m_parameters.begin(); it != m_parameters.end(); ++it) for (auto& parameter : m_parameters)
DestroyValue(it->second); DestroyValue(parameter.second);
m_parameters.clear(); m_parameters.clear();
} }

View File

@ -73,8 +73,7 @@ namespace Nz::GL
func = reinterpret_cast<FuncType>(originalFuncPtr); func = reinterpret_cast<FuncType>(originalFuncPtr);
#if !defined(NAZARA_COMPILER_MSVC) || NAZARA_PLATFORM_x64 #if defined(NAZARA_OPENGLRENDERER_DEBUG) && (!defined(NAZARA_COMPILER_MSVC) || defined(NAZARA_PLATFORM_x64))
#if NAZARA_OPENGLRENDERER_DEBUG
if (func) if (func)
{ {
if (std::strcmp(funcName, "glGetError") != 0) //< Prevent infinite recursion if (std::strcmp(funcName, "glGetError") != 0) //< Prevent infinite recursion
@ -83,7 +82,6 @@ namespace Nz::GL
func = Wrapper::WrapErrorHandling(); func = Wrapper::WrapErrorHandling();
} }
} }
#endif
#endif #endif
if (!func) if (!func)

View File

@ -18,7 +18,7 @@ namespace Nz
{ {
Vk::AutoCommandBuffer& commandBuffer = commandBuffers.emplace_back(m_commandPool.AllocateCommandBuffer(VK_COMMAND_BUFFER_LEVEL_PRIMARY)); Vk::AutoCommandBuffer& commandBuffer = commandBuffers.emplace_back(m_commandPool.AllocateCommandBuffer(VK_COMMAND_BUFFER_LEVEL_PRIMARY));
if (!commandBuffer->Begin()) if (!commandBuffer->Begin(VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT))
throw std::runtime_error("failed to begin command buffer: " + TranslateVulkanError(commandBuffer->GetLastErrorCode())); throw std::runtime_error("failed to begin command buffer: " + TranslateVulkanError(commandBuffer->GetLastErrorCode()));
VulkanCommandBufferBuilder builder(commandBuffer.Get(), imageIndex); VulkanCommandBufferBuilder builder(commandBuffer.Get(), imageIndex);