#include <Ultralight/platform/GPUDriver.h>
User-defined GPU driver interface.
The library uses this to optionally render Views directly on the GPU.
- Precondition
- Only used if the View is accelerated (see ViewConfig::is_accelerated)
This is automatically provided for you when you use App::Create(), AppCore provides platform-specific implementations of GPUDriver for each OS.
If you are using Renderer::Create(), you will need to provide your own implementation of this class if you have enabled the GPU renderer in the Config.
- See also
- Platform::set_gpu_driver()
◆ ~GPUDriver()
virtual ultralight::GPUDriver::~GPUDriver |
( |
| ) |
|
|
virtual |
◆ BeginSynchronize()
virtual void ultralight::GPUDriver::BeginSynchronize |
( |
| ) |
|
|
pure virtual |
Called before any commands are dispatched during a frame.
◆ CreateGeometry()
virtual void ultralight::GPUDriver::CreateGeometry |
( |
uint32_t |
geometry_id, |
|
|
const VertexBuffer & |
vertices, |
|
|
const IndexBuffer & |
indices |
|
) |
| |
|
pure virtual |
Create geometry with certain ID and vertex/index data.
◆ CreateRenderBuffer()
virtual void ultralight::GPUDriver::CreateRenderBuffer |
( |
uint32_t |
render_buffer_id, |
|
|
const RenderBuffer & |
buffer |
|
) |
| |
|
pure virtual |
Create a render buffer with certain ID and buffer description.
◆ CreateTexture()
virtual void ultralight::GPUDriver::CreateTexture |
( |
uint32_t |
texture_id, |
|
|
RefPtr< Bitmap > |
bitmap |
|
) |
| |
|
pure virtual |
Create a texture with a certain ID and optional bitmap.
NOTE: If the Bitmap is empty (Bitmap::IsEmpty), then a RTT Texture should be created instead. This will be used as a backing texture for a new RenderBuffer.
◆ DestroyGeometry()
virtual void ultralight::GPUDriver::DestroyGeometry |
( |
uint32_t |
geometry_id | ) |
|
|
pure virtual |
◆ DestroyRenderBuffer()
virtual void ultralight::GPUDriver::DestroyRenderBuffer |
( |
uint32_t |
render_buffer_id | ) |
|
|
pure virtual |
◆ DestroyTexture()
virtual void ultralight::GPUDriver::DestroyTexture |
( |
uint32_t |
texture_id | ) |
|
|
pure virtual |
◆ EndSynchronize()
virtual void ultralight::GPUDriver::EndSynchronize |
( |
| ) |
|
|
pure virtual |
Called after any commands are dispatched during a frame.
◆ NextGeometryId()
virtual uint32_t ultralight::GPUDriver::NextGeometryId |
( |
| ) |
|
|
pure virtual |
Generate the next available geometry ID.
◆ NextRenderBufferId()
virtual uint32_t ultralight::GPUDriver::NextRenderBufferId |
( |
| ) |
|
|
pure virtual |
Generate the next available render buffer ID.
◆ NextTextureId()
virtual uint32_t ultralight::GPUDriver::NextTextureId |
( |
| ) |
|
|
pure virtual |
Get the next available texture ID.
◆ UpdateCommandList()
virtual void ultralight::GPUDriver::UpdateCommandList |
( |
const CommandList & |
list | ) |
|
|
pure virtual |
Update command list (you should copy the commands to your own structure).
◆ UpdateGeometry()
virtual void ultralight::GPUDriver::UpdateGeometry |
( |
uint32_t |
geometry_id, |
|
|
const VertexBuffer & |
vertices, |
|
|
const IndexBuffer & |
indices |
|
) |
| |
|
pure virtual |
Update existing geometry with new vertex/index data.
◆ UpdateTexture()
virtual void ultralight::GPUDriver::UpdateTexture |
( |
uint32_t |
texture_id, |
|
|
RefPtr< Bitmap > |
bitmap |
|
) |
| |
|
pure virtual |
Update an existing non-RTT texture with new bitmap data.
The documentation for this class was generated from the following file: