3#include "../IContext.h"
4#include "../Statistics.h"
9 virtual const FrameStatistics& getLastFrameStatistics()
override {
return frame_statistics; }
10 virtual const UploadStatistics& getLastUploadStatistics()
override {
return upload_statistics; }
11 virtual void frameStatisticsConfigure(
bool )
override {}
22 virtual void setViewport(
const float ,
const float ,
const float ,
const float )
override {}
23 virtual void setScissor(
const int ,
const int ,
const int ,
const int )
override {}
55 virtual void setTexture(
const TextureBindingHandle , TextureViewHandle )
override {}
84 virtual void dispatchCompute(
const unsigned int ,
const unsigned int ,
const unsigned int )
override {}
100 virtual void copyResource(TextureHandle , TextureHandle )
override {}
101 virtual void copyTexture(TextureHandle ,
unsigned ,
unsigned ,
unsigned ,
unsigned , TextureHandle ,
unsigned )
override {}
103 virtual void clearResource(BufferHandle , uint32_t* )
override {}
104 virtual void clearResource(BufferHandle ,
float* )
override {}
106 FrameStatistics frame_statistics{};
107 UploadStatistics upload_statistics{};
virtual void setConstantBuffer(const ConstantBufferBindingHandle, const BufferHandle, const uint32_t=0, const uint32_t=~0u) override
Sets a constant buffer to the given constant buffer binding.
virtual void setRasterizerState(const RasterizerStateHandle) override
Set the current rasterizer state.
virtual uint32_t getBufferCounter(BufferHandle) override
Get the associated counter of a buffer.
virtual void clearDepth(const float=1.0f) override
Clear the currently set depth/stencil target to the given depth.
virtual void setVector2Variable(const EffectVariableHandle, const float *, size_t=1) override
Sets the given vector variable to the given two-component value.
virtual void dispatchCompute(const unsigned int, const unsigned int, const unsigned int) override
Dispatch computing work on the graphics device using the desired thread group count.
virtual void clearRenderTarget(const float *) override
Clear the currently set render target to the given value (4 component floating point RGBA).
virtual void setVector4Variable(const EffectVariableHandle, const float *, size_t=1) override
Sets the given vector variable to the given four-component value.
virtual void setSamplerState(const SamplerStateBindingHandle, const SamplerStateHandle) override
Sets the sampler state binding given to the given sampler state.
virtual void setMatrixVariable(const StringView &, const float *) override
Sets the matrix variable with the given name in the current effect to value.
virtual void setConstantBuffer(const StringView &, const BufferHandle, const uint32_t=0, const uint32_t=~0u) override
Sets a constant buffer to be bound to the given name and slot.
virtual void setVector2Variable(const StringView &, const float *) override
Sets the vector variable with the given name to the given two-component value.
virtual void setScalarVariable(const EffectVariableHandle, const float *, size_t) override
Sets the given scalar integer point variable to the given value.
virtual void signal(FenceHandle) override
Insert a fence in the command stream that will signal when all commands before the fence are complete...
virtual void setVector4Variable(const EffectVariableHandle, const int *, size_t=1) override
Sets the given vector variable to the given four-component value.
virtual void setVertexBuffers(const VertexBufferHandle *, const size_t, const uint32_t *, const uint32_t *) override
Sets the current vertex buffers.
virtual void endRenderPass() override
End a render pass.
virtual void readColorBuffer(BufferHandle, int, int, int, int, Framebuffer::EFrameBuffer) override
Reads data from the current render target into the given bufferHandle.
virtual void setEffect(EffectHandle) override
Set the current effect.
virtual void setVariable(const EffectVariableHandle, const uint8_t *, size_t) override
Sets the variable with the given name and size.
virtual void setTexture(const TextureBindingHandle, const TextureHandle) override
Sets the texture given to the binding given by textureBindingHandle.
virtual void setBlendState(const BlendStateHandle, const float *) override
Set the current blend state.
virtual void setBufferCounter(BufferHandle, BufferHandle) override
Set the associated counter of a buffer.
virtual void setInputLayout(const InputLayoutHandle) override
Sets the current input layout.
virtual void getBufferCounter(BufferHandle, BufferHandle) override
Get the associated counter of a buffer.
virtual void setScissor(const int, const int, const int, const int) override
Sets the current scissor rectangle.
virtual void setScalarVariable(const StringView &, int) override
Sets the scalar integer variable with the given name to the given value.
virtual void setScalarVariable(const EffectVariableHandle, int) override
Sets the given scalar integer point variable to the given value.
virtual void setVector3Variable(const EffectVariableHandle, const float *, size_t=1) override
Sets the given vector variable to the given three-component value.
virtual void unmap(TextureHandle) override
Release a host mapping of a staging texture.
virtual void readDepthBuffer(BufferHandle, int, int, int, int, Framebuffer::EFrameBuffer) override
Reads data from the current depth target into the given bufferHandle.
virtual void updateBuffer(BufferHandle, const void *, const size_t) override
Replace contents of buffer with new data.
virtual void drawInstanced(PrimitiveType::EPrimitiveType, const size_t, const size_t, const size_t, const size_t) override
Draws non-indexed, instanced primitives.
virtual void setVector3Variable(const StringView &, const float *) override
Sets the vector variable with the given name to the given three-component value.
virtual void drawInstancedIndexed(PrimitiveType::EPrimitiveType, const size_t, const size_t, const size_t, const size_t) override
Draws indexed, instanced primitives.
virtual void setScalarVariable(const EffectVariableHandle, const float) override
Sets the given scalar floating point variable to the given value.
virtual void setScalarVariable(const EffectVariableHandle, const int *, size_t) override
Sets the given scalar integer point variable to the given value.
virtual void setMatrixVariable(const EffectVariableHandle, const float *, size_t) override
Sets the given matrix variable to value.
virtual void setScalarVariable(const StringView &, const float) override
Sets the scalar floating point variable with the given name to the given value.
virtual void setMatrixVariable(const EffectVariableHandle, const float *) override
Sets the given matrix variable to value.
virtual void unmap(BufferHandle) override
Unmaps the given buffer, applying any synchronization necessary to reflect changes in the mapped memo...
virtual void setRenderTarget(const RenderTargetHandle, const DepthStencilHandle) override
Sets the current render target and an associated depth stencil target.
virtual void setBufferCounter(BufferHandle, uint32_t) override
Set the associated counter of a buffer.
virtual void setViewport(const float, const float, const float, const float) override
Sets the current viewport to the given location and dimensions.
virtual void setBuffer(const StringView &, BufferHandle) override
Sets the given buffer to the buffer binding slot with the given name.
virtual void updateSubBuffer(BufferHandle, const size_t, const size_t, const void *) override
Update a region of data in a buffer.
virtual void setIndexBuffer(IndexBufferHandle, uint32_t=4, uint32_t=0) override
Sets the current index buffer.
virtual void setVertexArrayObject(VertexArrayObjectHandle) override
Sets vertexBuffers and index buffers using a prevalidated vertex array object.
virtual void beginRenderPass(const RenderPassInfo &) override
Begin a render pass.
virtual void setDepthStencilState(const DepthStencilStateHandle) override
Set the current depth stencil state.
virtual void setVertexBuffers(const VertexBufferHandle *, const size_t) override
Overload provided to support transitioning.
virtual void updateSubTexture(TextureHandle, const size_t, const void *) override
Update the data of a level in the given texture.
virtual void setSamplerState(const StringView &, unsigned int, SamplerStateHandle) override
Sets the sampler slot given by unit with the given name to contain the given sampler state.
virtual void draw(PrimitiveType::EPrimitiveType, const size_t, const size_t) override
Draws non-indexed, non-instanced primitives.
virtual void * map(TextureHandle, MapMode::EMapMode, uint32_t *, uint32_t *) override
Create host mapping of a staging texture.
virtual void setVector4Variable(const StringView &, const float *) override
Sets the vector variable with the given name to the given four-component value.
virtual void drawIndexed(PrimitiveType::EPrimitiveType, const size_t, const size_t, const size_t=0) override
Draws indexed, non-instanced primitives.
virtual void resolveResource(TextureHandle, TextureHandle) override
Resolves the given source resource target into the given destination texture.
virtual void * map(BufferHandle, MapMode::EMapMode, uint32_t *=nullptr) override
Maps the given buffer so it can be accessed.
virtual void setTexture(const StringView &, unsigned int, TextureHandle) override
Sets the texture slot given by unit with the given name to contain the given texture.
virtual void clearRenderTarget(const float **, const int) override
Clear the currently set render target, setting the individual render target views to the given values...
virtual void setBuffer(const BufferBindingHandle, BufferHandle) override
Sets a buffer to bind to the given binding.
Provides a weakly referenced view over the contents of a string.
Contains all Cogs related functionality.
Handle template class used to provide opaque, non-converting handles.
Represents a graphics device context which can receive rendering commands.
EMapMode
Mapping mode enumeration.
EPrimitiveType
Primitive type enumeration.