2023-11-15 00:06:00 +01:00
|
|
|
#pragma once
|
|
|
|
|
#include "Enums.h"
|
2023-11-15 17:42:57 +01:00
|
|
|
#include "Descriptor.h"
|
2023-11-15 00:06:00 +01:00
|
|
|
|
|
|
|
|
namespace Seele
|
|
|
|
|
{
|
|
|
|
|
namespace Gfx
|
|
|
|
|
{
|
|
|
|
|
DECLARE_REF(Viewport)
|
|
|
|
|
class RenderCommand
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
RenderCommand();
|
|
|
|
|
virtual ~RenderCommand();
|
|
|
|
|
virtual void setViewport(Gfx::PViewport viewport) = 0;
|
|
|
|
|
virtual void bindPipeline(Gfx::PGraphicsPipeline pipeline) = 0;
|
|
|
|
|
virtual void bindDescriptor(Gfx::PDescriptorSet set) = 0;
|
|
|
|
|
virtual void bindDescriptor(const Array<Gfx::PDescriptorSet>& sets) = 0;
|
|
|
|
|
virtual void bindVertexBuffer(const Array<PVertexBuffer>& buffer) = 0;
|
|
|
|
|
virtual void bindIndexBuffer(Gfx::PIndexBuffer indexBuffer) = 0;
|
|
|
|
|
virtual void pushConstants(Gfx::PPipelineLayout layout, Gfx::SeShaderStageFlags stage, uint32 offset, uint32 size, const void* data) = 0;
|
|
|
|
|
virtual void draw(uint32 vertexCount, uint32 instanceCount, int32 firstVertex, uint32 firstInstance) = 0;
|
|
|
|
|
virtual void drawIndexed(uint32 indexCount, uint32 instanceCount, int32 firstIndex, uint32 vertexOffset, uint32 firstInstance) = 0;
|
2024-04-10 08:43:56 +02:00
|
|
|
virtual void drawMesh(uint32 groupX, uint32 groupY, uint32 groupZ) = 0;
|
2023-11-15 00:06:00 +01:00
|
|
|
std::string name;
|
|
|
|
|
};
|
|
|
|
|
DEFINE_REF(RenderCommand)
|
|
|
|
|
class ComputeCommand
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
ComputeCommand();
|
|
|
|
|
virtual ~ComputeCommand();
|
|
|
|
|
virtual void bindPipeline(Gfx::PComputePipeline pipeline) = 0;
|
|
|
|
|
virtual void bindDescriptor(Gfx::PDescriptorSet set) = 0;
|
|
|
|
|
virtual void bindDescriptor(const Array<Gfx::PDescriptorSet>& sets) = 0;
|
|
|
|
|
virtual void pushConstants(Gfx::PPipelineLayout layout, Gfx::SeShaderStageFlags stage, uint32 offset, uint32 size, const void* data) = 0;
|
|
|
|
|
virtual void dispatch(uint32 threadX, uint32 threadY, uint32 threadZ) = 0;
|
|
|
|
|
std::string name;
|
|
|
|
|
};
|
|
|
|
|
DEFINE_REF(ComputeCommand)
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|