Ultralight C API 1.4.0
|
#include <Ultralight/CAPI/CAPI_GPUDriver.h>
The state of the GPU for a given draw command.
This structure describes the current state of the GPU for a given draw command.
Public Attributes | |
unsigned int | viewport_width |
Viewport width in pixels. | |
unsigned int | viewport_height |
Viewport height in pixels. | |
ULMatrix4x4 | transform |
Transform matrix– you should multiply this with the screen-space orthographic projection matrix then pass to the vertex shader. | |
bool | enable_texturing |
Whether or not we should enable texturing for the current draw command. | |
bool | enable_blend |
Whether or not we should enable blending for the current draw command. | |
unsigned char | shader_type |
The vertex/pixel shader program pair to use for the current draw command. | |
unsigned int | render_buffer_id |
The render buffer to use for the current draw command. | |
unsigned int | texture_1_id |
The texture id to bind to slot #1. (Will be 0 if none) | |
unsigned int | texture_2_id |
The texture id to bind to slot #2. (Will be 0 if none) | |
unsigned int | texture_3_id |
The texture id to bind to slot #3. (Will be 0 if none) | |
float | uniform_scalar [8] |
The uniform scalars (passed to the pixel shader via uniforms). | |
ULvec4 | uniform_vector [8] |
The uniform vectors (passed to the pixel shader via uniforms). | |
unsigned char | clip_size |
The clip size (passed to the pixel shader via uniforms). | |
ULMatrix4x4 | clip [8] |
The clip stack (passed to the pixel shader via uniforms). | |
bool | enable_scissor |
Whether or not scissor testing should be used for the current draw command. | |
ULIntRect | scissor_rect |
The scissor rect to use for scissor testing (units in pixels) | |
ULMatrix4x4 clip[8] |
The clip stack (passed to the pixel shader via uniforms).
unsigned char clip_size |
The clip size (passed to the pixel shader via uniforms).
bool enable_blend |
Whether or not we should enable blending for the current draw command.
If blending is disabled, any drawn pixels should overwrite existing. Mainly used so we can modify alpha values of the RenderBuffer during scissored clears.
bool enable_scissor |
Whether or not scissor testing should be used for the current draw command.
bool enable_texturing |
Whether or not we should enable texturing for the current draw command.
unsigned int render_buffer_id |
The render buffer to use for the current draw command.
ULIntRect scissor_rect |
The scissor rect to use for scissor testing (units in pixels)
unsigned char shader_type |
The vertex/pixel shader program pair to use for the current draw command.
You should cast this to ShaderType to get the corresponding enum.
unsigned int texture_1_id |
The texture id to bind to slot #1. (Will be 0 if none)
unsigned int texture_2_id |
The texture id to bind to slot #2. (Will be 0 if none)
unsigned int texture_3_id |
The texture id to bind to slot #3. (Will be 0 if none)
ULMatrix4x4 transform |
Transform matrix– you should multiply this with the screen-space orthographic projection matrix then pass to the vertex shader.
float uniform_scalar[8] |
The uniform scalars (passed to the pixel shader via uniforms).
ULvec4 uniform_vector[8] |
The uniform vectors (passed to the pixel shader via uniforms).
unsigned int viewport_height |
Viewport height in pixels.
unsigned int viewport_width |
Viewport width in pixels.