|
Ultralight
1.0.0
A fast, lightweight, HTML UI engine for native apps.
|
GPUDriver interface, dispatches GPU calls to the native driver. More...
#include <GPUDriver.h>
Public Member Functions | |
| virtual void | BeginSynchronize ()=0 |
| Called before any commands are dispatched during a frame. | |
| virtual void | EndSynchronize ()=0 |
| Called after any commands are dispatched during a frame. | |
| virtual uint32_t | NextTextureId ()=0 |
| Get the next available texture ID. | |
| virtual void | CreateTexture (uint32_t texture_id, Ref< Bitmap > bitmap)=0 |
| Create a texture with a certain ID and optional bitmap. More... | |
| virtual void | UpdateTexture (uint32_t texture_id, Ref< Bitmap > bitmap)=0 |
| Update an existing non-RTT texture with new bitmap data. | |
| virtual void | BindTexture (uint8_t texture_unit, uint32_t texture_id)=0 |
| Bind a texture to a certain texture unit. | |
| virtual void | DestroyTexture (uint32_t texture_id)=0 |
| Destroy a texture. | |
| virtual uint32_t | NextRenderBufferId ()=0 |
| Generate the next available render buffer ID. | |
| virtual void | CreateRenderBuffer (uint32_t render_buffer_id, const RenderBuffer &buffer)=0 |
| Create a render buffer with certain ID and buffer description. | |
| virtual void | BindRenderBuffer (uint32_t render_buffer_id)=0 |
| Bind a render buffer. | |
| virtual void | ClearRenderBuffer (uint32_t render_buffer_id)=0 |
| Clear a render buffer (flush pixels) | |
| virtual void | DestroyRenderBuffer (uint32_t render_buffer_id)=0 |
| Destroy a render buffer. | |
| virtual uint32_t | NextGeometryId ()=0 |
| Generate the next available geometry ID. | |
| virtual void | CreateGeometry (uint32_t geometry_id, const VertexBuffer &vertices, const IndexBuffer &indices)=0 |
| Create geometry with certain ID and vertex/index data. | |
| virtual void | UpdateGeometry (uint32_t geometry_id, const VertexBuffer &vertices, const IndexBuffer &indices)=0 |
| Update existing geometry with new vertex/index data. | |
| virtual void | DrawGeometry (uint32_t geometry_id, uint32_t indices_count, uint32_t indices_offset, const GPUState &state)=0 |
| Draw geometry using the specific index count/offset and GPUState. | |
| virtual void | DestroyGeometry (uint32_t geometry_id)=0 |
| Destroy geometry. | |
| virtual void | UpdateCommandList (const CommandList &list)=0 |
| Update command list (you should copy the commands to your own structure). | |
| virtual bool | HasCommandsPending ()=0 |
| Check if any commands need drawing. | |
| virtual void | DrawCommandList ()=0 |
| Iterate through stored command list and dispatch to ClearRenderBuffer or DrawGeometry, respectively. More... | |
GPUDriver interface, dispatches GPU calls to the native driver.
By default, Ultralight uses an offscreen, OpenGL GPUDriver that draws each View to an offscreen Bitmap (
This is intended to be implemented by users and defined before creating the Renderer.
Definition at line 166 of file GPUDriver.h.
|
pure virtual |
Create a texture with a certain ID and optional bitmap.
If the Bitmap is empty (Bitmap::IsEmpty), then a RTT Texture should be created instead.
|
pure virtual |
Iterate through stored command list and dispatch to ClearRenderBuffer or DrawGeometry, respectively.
Command list should be cleared at end of call.