Lot of small fixes/improvements

This commit is contained in:
Jérôme Leclercq
2021-05-14 01:48:47 +02:00
parent 9376cfefd2
commit 61dbd91346
22 changed files with 84 additions and 82 deletions

View File

@@ -57,7 +57,7 @@ namespace Nz
inline void SetCommandCallback(CommandCallback callback);
inline void SetClearColor(std::size_t outputIndex, const std::optional<Color>& color);
inline void SetDepthStencilClear(float depth, UInt32 stencil);
inline void SetExecutionCallback(CommandCallback callback);
inline void SetExecutionCallback(ExecutionCallback callback);
inline void SetDepthStencilInput(std::size_t attachmentId);
inline void SetDepthStencilOutput(std::size_t attachmentId);

View File

@@ -102,9 +102,9 @@ namespace Nz
dsClear.stencil = stencil;
}
inline void FramePass::SetExecutionCallback(CommandCallback callback)
inline void FramePass::SetExecutionCallback(ExecutionCallback callback)
{
m_commandCallback = std::move(callback);
m_executionCallback = std::move(callback);
}
inline void FramePass::SetDepthStencilInput(std::size_t attachmentId)

View File

@@ -29,10 +29,10 @@ namespace Nz
OpenGLUploadPool& GetUploadPool() override;
void SubmitCommandBuffer(CommandBuffer* commandBuffer, QueueTypeFlags queueTypeFlags) override;
void Present() override;
void SubmitCommandBuffer(CommandBuffer* commandBuffer, QueueTypeFlags queueTypeFlags) override;
OpenGLRenderImage& operator=(const OpenGLRenderImage&) = delete;
OpenGLRenderImage& operator=(OpenGLRenderImage&&) = delete;

View File

@@ -12,10 +12,8 @@
#include <Nazara/OpenGLRenderer/Config.hpp>
#include <Nazara/OpenGLRenderer/Wrapper/Loader.hpp>
#include <Nazara/OpenGLRenderer/Wrapper/WGL/WGLContext.hpp>
#include <string>
#undef WIN32_LEAN_AND_MEAN //< Redefined by OpenGL header (ty Khronos)
#include <Nazara/OpenGLRenderer/Wrapper/WGL/WGLFunctions.hpp>
#include <string>
namespace Nz::GL
{

View File

@@ -39,8 +39,6 @@ namespace Nz
static std::size_t GetSize(StructFieldType fieldType);
private:
static inline std::size_t Align(std::size_t source, std::size_t alignment);
std::size_t m_largestFieldAlignment;
std::size_t m_offsetRounding;
std::size_t m_size;

View File

@@ -3,6 +3,7 @@
// For conditions of distribution and use, see copyright notice in Config.hpp
#include <Nazara/Utility/FieldOffsets.hpp>
#include <Nazara/Core/Algorithm.hpp>
#include <cassert>
#include <memory>
#include <Nazara/Utility/Debug.hpp>
@@ -163,15 +164,6 @@ namespace Nz
return 0;
}
inline std::size_t FieldOffsets::Align(std::size_t source, std::size_t alignment)
{
if (source == 0)
return source;
assert(alignment > 0);
return ((source + alignment - 1) / alignment) * alignment;
}
}
#include <Nazara/Utility/DebugOff.hpp>