Renderer: Implement and use debug names
This commit is contained in:
@@ -32,6 +32,8 @@ namespace Nz
|
||||
void* Map(UInt64 offset, UInt64 size) override;
|
||||
bool Unmap() override;
|
||||
|
||||
void UpdateDebugName(std::string_view name) override;
|
||||
|
||||
OpenGLBuffer& operator=(const OpenGLBuffer&) = delete;
|
||||
OpenGLBuffer& operator=(OpenGLBuffer&&) = delete;
|
||||
|
||||
|
||||
@@ -62,6 +62,8 @@ namespace Nz
|
||||
inline void SetScissor(const Recti& scissorRegion);
|
||||
inline void SetViewport(const Recti& viewportRegion);
|
||||
|
||||
void UpdateDebugName(std::string_view name) override;
|
||||
|
||||
OpenGLCommandBuffer& operator=(const OpenGLCommandBuffer&) = delete;
|
||||
OpenGLCommandBuffer& operator=(OpenGLCommandBuffer&&) = delete;
|
||||
|
||||
|
||||
@@ -27,6 +27,8 @@ namespace Nz
|
||||
|
||||
CommandBufferPtr BuildCommandBuffer(const std::function<void(CommandBufferBuilder& builder)>& callback) override;
|
||||
|
||||
void UpdateDebugName(std::string_view name) override;
|
||||
|
||||
OpenGLCommandPool& operator=(const OpenGLCommandPool&) = delete;
|
||||
OpenGLCommandPool& operator=(OpenGLCommandPool&&) = delete;
|
||||
|
||||
|
||||
@@ -35,6 +35,8 @@ namespace Nz
|
||||
|
||||
const Vector2ui& GetSize() const override;
|
||||
|
||||
void UpdateDebugName(std::string_view name) override;
|
||||
|
||||
OpenGLFboFramebuffer& operator=(const OpenGLFboFramebuffer&) = delete;
|
||||
OpenGLFboFramebuffer& operator=(OpenGLFboFramebuffer&&) = delete;
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@ namespace Nz
|
||||
OpenGLRenderPass(OpenGLRenderPass&&) noexcept = default;
|
||||
~OpenGLRenderPass() = default;
|
||||
|
||||
void UpdateDebugName(std::string_view name) override;
|
||||
|
||||
OpenGLRenderPass& operator=(const OpenGLRenderPass&) = delete;
|
||||
OpenGLRenderPass& operator=(OpenGLRenderPass&&) noexcept = default;
|
||||
};
|
||||
|
||||
@@ -26,6 +26,8 @@ namespace Nz
|
||||
|
||||
inline const RenderPipelineInfo& GetPipelineInfo() const override;
|
||||
|
||||
void UpdateDebugName(std::string_view name) override;
|
||||
|
||||
private:
|
||||
RenderPipelineInfo m_pipelineInfo;
|
||||
GL::Program m_program;
|
||||
|
||||
@@ -36,6 +36,8 @@ namespace Nz
|
||||
inline const nzsl::GlslWriter::BindingMapping& GetBindingMapping() const;
|
||||
inline const RenderPipelineLayoutInfo& GetLayoutInfo() const;
|
||||
|
||||
void UpdateDebugName(std::string_view name) override;
|
||||
|
||||
OpenGLRenderPipelineLayout& operator=(const OpenGLRenderPipelineLayout&) = delete;
|
||||
OpenGLRenderPipelineLayout& operator=(OpenGLRenderPipelineLayout&&) = delete;
|
||||
|
||||
|
||||
@@ -32,6 +32,8 @@ namespace Nz
|
||||
|
||||
void Update(const Binding* bindings, std::size_t bindingCount) override;
|
||||
|
||||
void UpdateDebugName(std::string_view name) override;
|
||||
|
||||
OpenGLShaderBinding& operator=(const OpenGLShaderBinding&) = delete;
|
||||
OpenGLShaderBinding& operator=(OpenGLShaderBinding&&) = delete;
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <Nazara/Renderer/ShaderModule.hpp>
|
||||
#include <NZSL/GlslWriter.hpp>
|
||||
#include <NZSL/Ast/Module.hpp>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace Nz
|
||||
@@ -31,6 +32,8 @@ namespace Nz
|
||||
|
||||
inline const std::vector<ExplicitBinding>& GetExplicitBindings() const;
|
||||
|
||||
void UpdateDebugName(std::string_view name) override;
|
||||
|
||||
struct ExplicitBinding
|
||||
{
|
||||
std::string name;
|
||||
@@ -61,6 +64,7 @@ namespace Nz
|
||||
|
||||
OpenGLDevice& m_device;
|
||||
nzsl::ShaderWriter::States m_states;
|
||||
std::string m_debugName;
|
||||
std::vector<ExplicitBinding> m_explicitBindings;
|
||||
std::vector<Shader> m_shaders;
|
||||
};
|
||||
|
||||
@@ -34,6 +34,8 @@ namespace Nz
|
||||
using Texture::Update;
|
||||
bool Update(const void* ptr, const Boxui& box, unsigned int srcWidth = 0, unsigned int srcHeight = 0, UInt8 level = 0) override;
|
||||
|
||||
void UpdateDebugName(std::string_view name) override;
|
||||
|
||||
OpenGLTexture& operator=(const OpenGLTexture&) = delete;
|
||||
OpenGLTexture& operator=(OpenGLTexture&&) = delete;
|
||||
|
||||
|
||||
@@ -24,6 +24,8 @@ namespace Nz
|
||||
|
||||
inline const GL::Sampler& GetSampler(bool mipmaps) const;
|
||||
|
||||
void UpdateDebugName(std::string_view name) override;
|
||||
|
||||
OpenGLTextureSampler& operator=(const OpenGLTextureSampler&) = delete;
|
||||
OpenGLTextureSampler& operator=(OpenGLTextureSampler&&) = delete;
|
||||
|
||||
|
||||
@@ -28,6 +28,8 @@ namespace Nz
|
||||
|
||||
const Vector2ui& GetSize() const override;
|
||||
|
||||
void UpdateDebugName(std::string_view name) override;
|
||||
|
||||
OpenGLWindowFramebuffer& operator=(const OpenGLWindowFramebuffer&) = delete;
|
||||
OpenGLWindowFramebuffer& operator=(OpenGLWindowFramebuffer&&) = delete;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user