A Renoir renderer backend implements API or engine-specific rendering. Ready-made backends are provided and can be directly used or modified to fit engine needs. The backend has two logical types of operations. There are resource operations (create vertex buffer, index buffer, texture etc.) and actual rendering state commands (set pixel shader, draw etc.). The Renoir Core will call BeginCommands() before starting a batch for drawing and EndCommands() when it's finished. The commands can encompass multiple scenes and even frames. All resource commands happen vefore all state commands. This means that all resources will be created and/or updated and then ExecuteRendering() will be called with all the actual rendering on those resources. This behaviour is guaranteed, makes resource management much simpler and allow for easier parallelization of the backend. The backend also implements the "click-through" functionality.
More...
|
virtual void | FillCaps (RendererCaps &outCaps)=0 |
| Sets the "caps" flags of the backend. It's important to correctly set these flags for maximum performance.
|
|
virtual void | BeginCommands ()=0 |
| Called when a new list of commands will be executed. You can put state-setting code here.
|
|
virtual void | WrapUserRenderTarget (void *userObject, const Texture2D &description, Texture2DObject object, void *depthStencil, const DepthStencilTexture &dsDescription, DepthStencilTextureObject dsObject)=0 |
| Called to wrap a user-supplied RenderTarget in a handle used by Renoir. More...
|
|
virtual void | WrapUserTexture (void *userObject, const Texture2D &description, Texture2DObject object)=0 |
| Called to wrap a user texture in a Renoir handle. More...
|
|
virtual bool | CreatePipelineState (const PipelineState &state, PipelineStateObject object)=0 |
| Reqests the creation of a Pipeline state. The PSO contains shaders and blend, ds states. More...
|
|
virtual void | DestroyPipelineState (PipelineStateObject object)=0 |
| Requests the destruction of a PSO.
|
|
virtual bool | CreateVertexBuffer (VertexType type, unsigned count, VertexBufferObject object, bool changesOften)=0 |
| Create a vertex buffer with the specified format and size. More...
|
|
virtual void | DestroyVertexBuffer (VertexBufferObject object)=0 |
| Requests the destruction of a VB.
|
|
virtual void * | MapVertexBuffer (VertexBufferObject object)=0 |
| Map VB to RAM for update.
|
|
virtual void | UnmapVertexBuffer (VertexBufferObject object, unsigned elementCount)=0 |
| Unmap vertex buffer. More...
|
|
virtual bool | CreateIndexBuffer (IndexBufferType format, unsigned count, IndexBufferObject object, bool changesOften)=0 |
| Create an index buffer on the GPU. More...
|
|
virtual void | DestroyIndexBuffer (IndexBufferObject object)=0 |
| Destroy index buffer.
|
|
virtual void * | MapIndexBuffer (IndexBufferObject object)=0 |
| Maps an index buffer for update from the CPU.
|
|
virtual void | UnmapIndexBuffer (IndexBufferObject object, unsigned elementCount)=0 |
| Unmaps an index buffer. More...
|
|
virtual bool | CreateConstantBuffer (CBType type, ConstantBufferObject object, unsigned size)=0 |
| Creates a constant (uniform) buffer object. More...
|
|
virtual void | DestroyConstantBuffer (ConstantBufferObject object)=0 |
| Requests the destruction of a constant buffer.
|
|
virtual bool | CreateTexture (Texture2DObject texture, const Texture2D &description, const void *data, unsigned dataLen)=0 |
| Create a texture object. More...
|
|
virtual void | DestroyTexture (Texture2DObject texture)=0 |
| Destroy a texture.
|
|
virtual void | UpdateTexture (Texture2DObject texture, const Texture2D &description, UpdateBox *boxes, const void **newBytes, unsigned count, bool willOverwrite)=0 |
| Update the contents of a texture. More...
|
|
virtual bool | CreateDepthStencilTexture (DepthStencilTextureObject object, const DepthStencilTexture &description)=0 |
| Create a depth-stencil texture. More...
|
|
virtual void | DestroyDepthStencilTexture (DepthStencilTextureObject object)=0 |
| Destroy a DS texture.
|
|
virtual bool | CreateSampler2D (Sampler2DObject sampler, const Sampler2D &description)=0 |
| Create a sampler object for 2D textures.
|
|
virtual void | DestroySampler2D (Sampler2DObject sampler)=0 |
| Destroy sampler.
|
|
virtual void | ExecuteRendering (const BackendCommandsBuffer *buffers, unsigned buffersCount, const ConstantBufferUpdateData *CBOUpdates, unsigned CBOUpdatesCount)=0 |
| Actual rendering commands that operate on updated and ready resources. More...
|
|
virtual void | EndCommands ()=0 |
| Called when a list buffers is executed.
|
|
virtual class DynamicRendererBackend * | GetDynamicInterface () |
| Tells if the backend is a special "dynamic" type that allows additional runtime operations like creating shaders on runtime.
|
|
virtual bool | ReadTexture (TextureObject, const UpdateBox &, void *) |
| Reads texture from GPU memory to data Used for capturing command buffers for replay Returns wheather it read the texture.
|
|
A Renoir renderer backend implements API or engine-specific rendering. Ready-made backends are provided and can be directly used or modified to fit engine needs. The backend has two logical types of operations. There are resource operations (create vertex buffer, index buffer, texture etc.) and actual rendering state commands (set pixel shader, draw etc.). The Renoir Core will call BeginCommands() before starting a batch for drawing and EndCommands() when it's finished. The commands can encompass multiple scenes and even frames. All resource commands happen vefore all state commands. This means that all resources will be created and/or updated and then ExecuteRendering() will be called with all the actual rendering on those resources. This behaviour is guaranteed, makes resource management much simpler and allow for easier parallelization of the backend. The backend also implements the "click-through" functionality.