Defines of a graphics library backend. More...
#include <kanzi/gfx/abstract_backend.hpp>
Defines of a graphics library backend.
Implement this interface to create a custom graphics backend. All methods on this interface, except for initialization and shutdown, must be thread-safe with other methods.
|
default |
Constructor.
|
virtualdefault |
Destructor.
|
delete |
|
deletenoexcept |
|
delete |
|
deletenoexcept |
|
pure virtual |
Initializes the backend.
Must be called before any other call to the backend.
| info | The graphics common initialization information. |
Prepares for backend shutdown.
Kanzi calls prepareForShutdown() at the beginning of gfx::shutdown() to give an opportunity to prepare the backend for the shutdown operation. For example, ensuring that any resources used by the backend are not in current use.
Shuts down the backend and frees any resources.
|
pure virtual |
Gets the current backend information.
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Returns whether a shader format is supported by the current backend and device.
| format | The shader format. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Returns whether a native handle type for texture is supported by the current backend.
| handle | The native texture handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Gets the AttachmentDescriptionSet for the requested FrameBuffer.
| handle | The FrameBuffer handle. |
|
pure virtual |
Updates the Surface dimensions.
Notifies the backend that a resize has occurred.
| handle | the FrameBuffer handle. |
| dimensions | The dimensions. |
|
pure virtual |
Waits for a GPU fence to be signaled.
| handle | The GPU fence handle. |
| timeout | The time in nanoseconds to wait before timing out. |
|
pure virtual |
Resets the signal state of a GPU fence.
| handle | The GPU fence handle. |
|
pure virtual |
Maps a buffer into CPU-accessible memory.
A buffer can have only one mapping at a time.
| handle | The buffer handle. |
| offset | An offset to the subregion to map. |
| size | The size of the subregion to map. |
|
pure virtual |
Unmaps a previously mapped buffer.
| handle | The buffer handle. |
| updatedRanges | The ranges of the buffer that were updated. |
|
pure virtual |
Gets a device property value.
| property | The DevicePropertyId to query. |
Implemented in kanzi::gfx::BackendLayer.
Returns whether a graphics feature is enabled on the current device.
| feature | The FeatureId to query. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Gets device feature flags for a format.
| format | The image format. |
|
pure virtual |
Allocates memory from the end of a command buffer.
| buffer | The command buffer handle. |
| size | The size in bytes to allocate. |
|
pure virtual |
Peeks at the currently allocated memory inside a command buffer.
| handle | The command buffer handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Processes the commands in the command buffer.
When the processing completes, calls the callback function. This is an asynchronous operation and can be incomplete when this function returns.
| commands | The command buffer handle. |
| callback | The backend calls this callback when command processing is complete. The callback must be callable from any thread. |
|
pure virtual |
Gets the status of a shader object.
| handle | The shader handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Gets the status of a render pipeline object.
| handle | The render pipeline handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Creates a buffer object.
| createInfo | Creation parameters for the buffer object. |
|
pure virtual |
Creates an image object.
| createInfo | Creation parameters for the image object. |
|
pure virtual |
Creates a frame buffer object.
| createInfo | Creation parameters for the frame buffer object. |
|
pure virtual |
Creates a vertex input state object.
| createInfo | Creation parameters for the vertex input state object. |
|
pure virtual |
Creates a depth stencil state object.
| createInfo | Creation parameters for the depth stencil state object. |
|
pure virtual |
Creates a blend state object.
| createInfo | Creation parameters for the blend state object. |
|
pure virtual |
Creates a raster state object.
| createInfo | Creation parameters for the raster state object. |
|
pure virtual |
Creates a render resource set object.
| createInfo | Creation parameters for the render resource set object. |
|
pure virtual |
Creates a compute resource set object.
| createInfo | Creation parameters for the compute resource set object. |
|
pure virtual |
Creates a sampler object.
| createInfo | Creation parameters for the sampler object. |
|
pure virtual |
Creates a shader object.
| createInfo | Creation parameters for the shader object. |
|
pure virtual |
Creates a compute pipeline object.
| createInfo | Creation parameters for the compute pipeline object. |
|
pure virtual |
Creates a render pipeline object.
| createInfo | Creation parameters for the render pipeline object. |
|
pure virtual |
Creates a render pass object.
| createInfo | Creation parameters for the render pass object. |
|
pure virtual |
Creates a command buffer object.
| createInfo | Creation parameters for the command buffer object. |
|
pure virtual |
Creates a GPU fence object.
| createInfo | Creation parameters for the GPU fence object. |
|
pure virtual |
Gets an internal HandleObject from a buffer handle.
| handle | The buffer handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Gets an internal HandleObject from an image handle.
| handle | The image handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Gets an internal HandleObject from a frame buffer handle.
| handle | The frame buffer handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Gets an internal HandleObject from a vertex input state handle.
| handle | The vertex input state handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Gets an internal HandleObject from a depth stencil state handle.
| handle | The depth stencil state handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Gets an internal HandleObject from a blend state handle.
| handle | The blend state handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Gets an internal HandleObject from a raster state handle.
| handle | The raster state handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Gets an internal HandleObject from a render resource set handle.
| handle | The render resource set handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Gets an internal HandleObject from a compute resource set handle.
| handle | The compute resource set handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Gets an internal HandleObject from a sampler handle.
| handle | The sampler handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Gets an internal HandleObject from a shader handle.
| handle | The shader handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Gets an internal HandleObject from a compute pipeline handle.
| handle | The compile pipeline handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Gets an internal HandleObject from a render pipeline handle.
| handle | The render pipeline handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Gets an internal HandleObject from a render pass handle.
| handle | The render pass handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Gets an internal HandleObject from a command buffer handle.
| handle | The command buffer handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Gets an internal HandleObject from a GPU fence handle.
| handle | The GPU fence handle. |
Implemented in kanzi::gfx::BackendLayer.
|
pure virtual |
Destroys a buffer object.
| handle | The buffer handle. |
|
pure virtual |
Destroys a buffer object.
| handle | The image handle. |
|
pure virtual |
Destroys a buffer object.
| handle | The frame buffer handle. |
|
pure virtual |
Destroys a buffer object.
| handle | The vertex input state handle. |
|
pure virtual |
Destroys a buffer object.
| handle | The depth stencil state handle. |
|
pure virtual |
Destroys a buffer object.
| handle | The blend state handle. |
|
pure virtual |
Destroys a buffer object.
| handle | The raster state handle. |
|
pure virtual |
Destroys a buffer object.
| handle | The render resource set handle. |
|
pure virtual |
Destroys a buffer object.
| handle | The compute resource set handle. |
|
pure virtual |
Destroys a buffer object.
| handle | The sampler handle. |
|
pure virtual |
Destroys a buffer object.
| handle | The shader handle. |
|
pure virtual |
Destroys a buffer object.
| handle | The compute pipeline handle. |
|
pure virtual |
Destroys a buffer object.
| handle | The render pipeline handle. |
|
pure virtual |
Destroys a buffer object.
| handle | The render pass handle. |
|
pure virtual |
Destroys a buffer object.
| handle | The command buffer handle. |
|
pure virtual |
Destroys a buffer object.
| handle | The GPU fence handle. |