Pyrogenesis
trunk
|
#include <DeviceCommandContext.h>
Classes | |
struct | BindUnit |
class | ScopedBind |
class | ScopedBufferBind |
struct | VertexAttributeFormat |
Public Types | |
using | UploadBufferFunction = std::function< void(u8 *)> |
Public Types inherited from Renderer::Backend::IDeviceCommandContext | |
using | UploadBufferFunction = std::function< void(u8 *)> |
Public Member Functions | |
~CDeviceCommandContext () | |
IDevice * | GetDevice () override |
void | SetGraphicsPipelineState (const SGraphicsPipelineStateDesc &pipelineState) |
void | SetGraphicsPipelineState (IGraphicsPipelineState *pipelineState) override |
Binds the graphics pipeline state. More... | |
void | BlitFramebuffer (IFramebuffer *destinationFramebuffer, IFramebuffer *sourceFramebuffer) override |
void | BeginFramebufferPass (IFramebuffer *framebuffer) override |
Starts a framebuffer pass, performs attachment load operations. More... | |
void | EndFramebufferPass () override |
Finishes a framebuffer pass, performs attachment store operations. More... | |
void | ClearFramebuffer (const bool color, const bool depth, const bool stencil) override |
Clears all mentioned attachments. More... | |
void | ReadbackFramebufferSync (const uint32_t x, const uint32_t y, const uint32_t width, const uint32_t height, void *data) override |
void | UploadTexture (ITexture *texture, const Format dataFormat, const void *data, const size_t dataSize, const uint32_t level=0, const uint32_t layer=0) override |
void | UploadTextureRegion (ITexture *texture, const Format dataFormat, const void *data, const size_t dataSize, const uint32_t xOffset, const uint32_t yOffset, const uint32_t width, const uint32_t height, const uint32_t level=0, const uint32_t layer=0) override |
void | UploadBuffer (IBuffer *buffer, const void *data, const uint32_t dataSize) override |
void | UploadBuffer (IBuffer *buffer, const UploadBufferFunction &uploadFunction) override |
void | UploadBufferRegion (IBuffer *buffer, const void *data, const uint32_t dataOffset, const uint32_t dataSize) override |
void | UploadBufferRegion (IBuffer *buffer, const uint32_t dataOffset, const uint32_t dataSize, const UploadBufferFunction &uploadFunction) override |
void | SetScissors (const uint32_t scissorCount, const Rect *scissors) override |
void | SetViewports (const uint32_t viewportCount, const Rect *viewports) override |
void | SetVertexInputLayout (IVertexInputLayout *vertexInputLayout) override |
Binds the vertex input layout. More... | |
void | SetVertexBuffer (const uint32_t bindingSlot, IBuffer *buffer, const uint32_t offset) override |
void | SetVertexBufferData (const uint32_t bindingSlot, const void *data, const uint32_t dataSize) override |
void | SetIndexBuffer (IBuffer *buffer) override |
void | SetIndexBufferData (const void *data, const uint32_t dataSize) override |
void | BeginPass () override |
void | EndPass () override |
void | Draw (const uint32_t firstVertex, const uint32_t vertexCount) override |
void | DrawIndexed (const uint32_t firstIndex, const uint32_t indexCount, const int32_t vertexOffset) override |
void | DrawInstanced (const uint32_t firstVertex, const uint32_t vertexCount, const uint32_t firstInstance, const uint32_t instanceCount) override |
void | DrawIndexedInstanced (const uint32_t firstIndex, const uint32_t indexCount, const uint32_t firstInstance, const uint32_t instanceCount, const int32_t vertexOffset) override |
void | DrawIndexedInRange (const uint32_t firstIndex, const uint32_t indexCount, const uint32_t start, const uint32_t end) override |
void | SetTexture (const int32_t bindingSlot, ITexture *texture) override |
void | SetUniform (const int32_t bindingSlot, const float value) override |
void | SetUniform (const int32_t bindingSlot, const float valueX, const float valueY) override |
void | SetUniform (const int32_t bindingSlot, const float valueX, const float valueY, const float valueZ) override |
void | SetUniform (const int32_t bindingSlot, const float valueX, const float valueY, const float valueZ, const float valueW) override |
void | SetUniform (const int32_t bindingSlot, PS::span< const float > values) override |
void | BeginScopedLabel (const char *name) override |
void | EndScopedLabel () override |
void | Flush () override |
void | OnTextureDestroy (CTexture *texture) |
Public Member Functions inherited from Renderer::Backend::IDeviceCommandContext | |
virtual void | SetScissors (const uint32_t scissorCount, const Rect *scissors)=0 |
virtual void | SetViewports (const uint32_t viewportCount, const Rect *viewports)=0 |
Public Member Functions inherited from Renderer::Backend::IDeviceObject< IDeviceCommandContext > | |
virtual | ~IDeviceObject () |
T * | As () |
Private Types | |
using | BoundBuffer = std::pair< GLenum, GLuint > |
Private Member Functions | |
CDeviceCommandContext (CDevice *device) | |
void | ResetStates () |
void | SetGraphicsPipelineStateImpl (const SGraphicsPipelineStateDesc &pipelineStateDesc, const bool force) |
void | BindTexture (const uint32_t unit, const GLenum target, const GLuint handle) |
void | BindBuffer (const IBuffer::Type type, CBuffer *buffer) |
Static Private Member Functions | |
static std::unique_ptr< CDeviceCommandContext > | Create (CDevice *device) |
Private Attributes | |
CDevice * | m_Device = nullptr |
SGraphicsPipelineStateDesc | m_GraphicsPipelineStateDesc {} |
CFramebuffer * | m_Framebuffer = nullptr |
CShaderProgram * | m_ShaderProgram = nullptr |
uint32_t | m_ScissorCount = 0 |
std::array< Rect, 1 > | m_Scissors |
uint32_t | m_ScopedLabelDepth = 0 |
CBuffer * | m_VertexBuffer = nullptr |
CBuffer * | m_IndexBuffer = nullptr |
const void * | m_IndexBufferData = nullptr |
bool | m_InsideFramebufferPass = false |
bool | m_InsidePass = false |
uint32_t | m_ActiveTextureUnit = 0 |
std::array< BindUnit, 16 > | m_BoundTextures |
std::array< BoundBuffer, 2 > | m_BoundBuffers |
std::array< VertexAttributeFormat, static_cast< size_t >VertexAttributeStream::UV7)+1 > | m_VertexAttributeFormat |
Friends | |
class | CDevice |
class | CTexture |
|
private |
using Renderer::Backend::GL::CDeviceCommandContext::UploadBufferFunction = std::function<void(u8*)> |
|
default |
|
private |
|
overridevirtual |
Starts a framebuffer pass, performs attachment load operations.
It should be called as rarely as possible.
Implements Renderer::Backend::IDeviceCommandContext.
|
overridevirtual |
Implements Renderer::Backend::IDeviceCommandContext.
|
overridevirtual |
Implements Renderer::Backend::IDeviceCommandContext.
|
private |
|
private |
|
overridevirtual |
Implements Renderer::Backend::IDeviceCommandContext.
|
overridevirtual |
Clears all mentioned attachments.
Prefer to use attachment load operations over this function. It should be called only inside a framebuffer pass.
Implements Renderer::Backend::IDeviceCommandContext.
|
staticprivate |
|
overridevirtual |
Implements Renderer::Backend::IDeviceCommandContext.
|
overridevirtual |
Implements Renderer::Backend::IDeviceCommandContext.
|
overridevirtual |
Implements Renderer::Backend::IDeviceCommandContext.
|
overridevirtual |
Implements Renderer::Backend::IDeviceCommandContext.
|
overridevirtual |
Implements Renderer::Backend::IDeviceCommandContext.
|
overridevirtual |
Finishes a framebuffer pass, performs attachment store operations.
Implements Renderer::Backend::IDeviceCommandContext.
|
overridevirtual |
Implements Renderer::Backend::IDeviceCommandContext.
|
overridevirtual |
Implements Renderer::Backend::IDeviceCommandContext.
|
overridevirtual |
Implements Renderer::Backend::IDeviceCommandContext.
|
overridevirtual |
void Renderer::Backend::GL::CDeviceCommandContext::OnTextureDestroy | ( | CTexture * | texture | ) |
|
overridevirtual |
Implements Renderer::Backend::IDeviceCommandContext.
|
private |
void Renderer::Backend::GL::CDeviceCommandContext::SetGraphicsPipelineState | ( | const SGraphicsPipelineStateDesc & | pipelineState | ) |
|
overridevirtual |
Binds the graphics pipeline state.
It should be called only inside a framebuffer pass and as rarely as possible.
Implements Renderer::Backend::IDeviceCommandContext.
|
private |
|
overridevirtual |
Implements Renderer::Backend::IDeviceCommandContext.
|
overridevirtual |
Implements Renderer::Backend::IDeviceCommandContext.
|
override |
|
overridevirtual |
Implements Renderer::Backend::IDeviceCommandContext.
|
overridevirtual |
Implements Renderer::Backend::IDeviceCommandContext.
|
overridevirtual |
Implements Renderer::Backend::IDeviceCommandContext.
|
overridevirtual |
Implements Renderer::Backend::IDeviceCommandContext.
|
overridevirtual |
Implements Renderer::Backend::IDeviceCommandContext.
|
overridevirtual |
Implements Renderer::Backend::IDeviceCommandContext.
|
overridevirtual |
Implements Renderer::Backend::IDeviceCommandContext.
|
overridevirtual |
Implements Renderer::Backend::IDeviceCommandContext.
|
overridevirtual |
Binds the vertex input layout.
It should be compatible with the shader program's one. It should be called only inside a framebuffer pass and as rarely as possible.
Implements Renderer::Backend::IDeviceCommandContext.
|
override |
|
overridevirtual |
Implements Renderer::Backend::IDeviceCommandContext.
|
overridevirtual |
Implements Renderer::Backend::IDeviceCommandContext.
|
overridevirtual |
Implements Renderer::Backend::IDeviceCommandContext.
|
overridevirtual |
Implements Renderer::Backend::IDeviceCommandContext.
|
overridevirtual |
Implements Renderer::Backend::IDeviceCommandContext.
|
overridevirtual |
Implements Renderer::Backend::IDeviceCommandContext.
|
friend |
|
friend |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |