mirror of
https://github.com/antopilo/Nuake.git
synced 2026-09-15 20:08:54 +03:00
Made some commandbuffer method const
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "Cmd.h"
|
||||
|
||||
using namespace Nuake;
|
||||
|
||||
void Cmd::BeginRendering(VkRenderingInfo renderInfo)
|
||||
@@ -16,7 +17,7 @@ void Cmd::BindPipeline(VkPipeline pipeline) const
|
||||
vkCmdBindPipeline(CmdBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline);
|
||||
}
|
||||
|
||||
void Cmd::SetViewport(const Vector2 & size)
|
||||
void Cmd::SetViewport(const Vector2 & size) const
|
||||
{
|
||||
VkViewport viewport = {};
|
||||
viewport.x = 0;
|
||||
@@ -29,7 +30,7 @@ void Cmd::SetViewport(const Vector2 & size)
|
||||
vkCmdSetViewport(CmdBuffer, 0, 1, &viewport);
|
||||
}
|
||||
|
||||
void Cmd::SetScissor(const Vector2 & size)
|
||||
void Cmd::SetScissor(const Vector2 & size) const
|
||||
{
|
||||
VkRect2D scissor = {};
|
||||
scissor.offset.x = 0;
|
||||
@@ -97,7 +98,7 @@ void Cmd::CopyBuffer(VkBuffer src, VkBuffer dst, size_t size) const
|
||||
vkCmdCopyBuffer(CmdBuffer, src, dst, 1, ©);
|
||||
}
|
||||
|
||||
void Cmd::TransitionImageLayout(Ref<VulkanImage> img, VkImageLayout layout)
|
||||
void Cmd::TransitionImageLayout(Ref<VulkanImage> img, VkImageLayout layout) const
|
||||
{
|
||||
img->TransitionLayout(CmdBuffer, layout);
|
||||
}
|
||||
|
||||
@@ -23,15 +23,15 @@ namespace Nuake
|
||||
void EndRendering();
|
||||
|
||||
void BindPipeline(VkPipeline pipeline) const;
|
||||
void SetViewport(const Vector2& size);
|
||||
void SetScissor(const Vector2& size);
|
||||
void SetViewport(const Vector2& size) const;
|
||||
void SetScissor(const Vector2& size) const;
|
||||
void ClearColorImage(Ref<VulkanImage> img, Color color = Color(0, 0, 0, 1)) const;
|
||||
void BindDescriptorSet(VkPipelineLayout pipeline, VkDescriptorSet descriptor, uint32_t set) const;
|
||||
void BindIndexBuffer(VkBuffer buffer) const;
|
||||
void DrawIndexed(uint32_t count) const;
|
||||
void PushConstants(VkPipelineLayout pipeline, size_t size, void* data ) const;
|
||||
void CopyBuffer(VkBuffer src, VkBuffer dst, size_t size) const;
|
||||
void TransitionImageLayout(Ref<VulkanImage> img, VkImageLayout layout);
|
||||
void TransitionImageLayout(Ref<VulkanImage> img, VkImageLayout layout) const;
|
||||
void CopyImageToImage(Ref<VulkanImage> src, Ref<VulkanImage> dst) const;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user