59 virtual void Draw(uint32_t vertexCount) = 0;
63 virtual void DrawInstance(uint32_t instanceCount, uint32_t vertexPerInstance) = 0;
71 virtual void SetViewport(
float x,
float y,
float width,
float height,
float minDepth = 0.0f,
float maxDepth = 1.0f) = 0;
73 virtual void ClearDepthStencil(
bool clearDepth,
bool clearStencil,
float depth, uint8_t stencil) = 0;
Backend-agnostic GPU buffer: vertex, index, constant, or resource view target.
Abstract interface for high-level graphics command execution and resource management.
virtual void BeginForwardTransparentPass()
virtual void BindBoneBuffer(RefPtr< BufferBase > buffer)
virtual void BindTexture(RefPtr< Sleak::Texture > texture, uint32_t slot=0)
virtual void SetViewport(float x, float y, float width, float height, float minDepth=0.0f, float maxDepth=1.0f)=0
Sets the active viewport rect and depth range in pixel/NDC units.
virtual Shader * CreateShader(const std::string &shaderSource)=0
Compiles a shader program from source or a source-file path.
virtual void SetCullEnabled(bool enabled)
virtual void Draw(uint32_t vertexCount)=0
Non-indexed draw from the currently bound vertex buffer.
virtual void SetDepthCompare(DepthCompare compare)
virtual void DrawIndexedInstance(uint32_t instanceCount, uint32_t indexPerInstance)=0
Indexed instanced draw.
virtual void ClearRenderTarget(float r, float g, float b, float a)=0
virtual void EndShadowPass()
virtual void DrawInstance(uint32_t instanceCount, uint32_t vertexPerInstance)=0
Non-indexed instanced draw.
virtual void SetRenderMode(RenderMode mode)=0
virtual void EndForwardTransparentPass()
virtual void UpdateDeferredCB(const void *data, uint32_t size)
virtual bool IsDeferredEnabled() const
virtual void BindVertexBuffer(RefPtr< BufferBase > buffer, uint32_t slot=0)=0
virtual void BeginCustomFormatPass(VertexFormatHandle format)
Binds the pipeline built for a registered vertex layout in the active render pass.
virtual void ClearDepthStencil(bool clearDepth, bool clearStencil, float depth, uint8_t stencil)=0
virtual void BeginShadowPass()
virtual void EndSkinnedPass()
virtual void BeginSkyboxPass()
virtual bool IsShadowPassActive() const
virtual void BindIndexBuffer(RefPtr< BufferBase > buffer, uint32_t slot=0)=0
virtual void BindGBufferShader()
virtual bool IsInGeometryPass() const
virtual Texture * CreateTextureFromData(uint32_t width, uint32_t height, void *data)=0
Creates a texture from an in-memory pixel buffer.
virtual void BeginSkinnedPass()
virtual void BindTextureRaw(Sleak::Texture *texture, uint32_t slot=0)
virtual void ExecuteDeferredLightingPass()
virtual void SetDepthWrite(bool enabled)
virtual BufferBase * CreateBuffer(BufferType Type, uint32_t size, void *data)=0
Allocates a backend buffer, optionally seeded with initial data.
virtual void BeginDebugLinePass()
virtual void EndCustomFormatPass()
Restores the pipeline that was active before the custom format draws.
virtual void BindPBRMaterial(Sleak::Material *material)
virtual void SetRenderFace(RenderFace face)=0
virtual void EndDebugLinePass()
virtual void EndSkyboxPass()
virtual Texture * CreateTexture(const std::string &TexturePath)=0
Loads a texture from disk.
virtual void BindConstantBuffer(RefPtr< BufferBase > buffer, uint32_t slot=0)=0
virtual void DrawIndexed(uint32_t indexCount)=0
Indexed draw from the currently bound vertex/index buffers.
Backend-agnostic compiled shader program.
Backend-facing rendering layer shared by the four graphics backends.
DepthCompare
Depth test comparison function.
RenderMode
Rasterizer fill style for a draw.
BufferType
GPU buffer usage kind, drives backend binding flags and layout.
RenderFace
Which triangle winding gets culled.
Root namespace for everything the engine exposes.
uint32_t VertexFormatHandle