|
Ultralight C++ API 2.0.0
|
#include <Ultralight/platform/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 | |
| uint32_t | viewport_width |
| Viewport width in pixels. | |
| uint32_t | viewport_height |
| Viewport height in pixels. | |
| Matrix4x4 | 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. | |
| BlendFactor | blend_src_factor |
| The blend factor for the source color (pixel shader output). | |
| BlendFactor | blend_dst_factor |
| The blend factor for the destination color (render buffer). | |
| BlendEquation | blend_equation |
| The mathematical equation used to combine the source and destination colors. | |
| ShaderType | shader_type |
| The vertex/pixel shader program pair to use for the current draw command. | |
| uint32_t | render_buffer_id |
| The render buffer to use for the current draw command. | |
| uint32_t | texture_1_id |
| The texture id to bind to slot #1. (Will be 0 if none). | |
| uint32_t | texture_2_id |
| The texture id to bind to slot #2. (Will be 0 if none). | |
| uint32_t | texture_3_id |
| The texture id to bind to slot #3. (Will be 0 if none). | |
| uint32_t | texture_4_id |
| The texture id to bind to slot #4. | |
| int32_t | uniform_integer [8] |
| The uniform integers (passed to the pixel shader via uniforms). | |
| float | uniform_scalar [8] |
| The uniform scalars (passed to the pixel shader via uniforms). | |
| vec4 | uniform_vector [8] |
| The uniform vectors (passed to the pixel shader via uniforms). | |
| uint8_t | clip_size |
| The clip size (passed to the pixel shader via uniforms). | |
| Matrix4x4 | 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. | |
| IntRect | scissor_rect |
| The scissor rect to use for scissor testing (units in pixels). | |
| BlendFactor blend_dst_factor |
The blend factor for the destination color (render buffer).
This factor is multiplied with the destination color before the blend equation is applied. The library sets it on every draw command (InvSrcAlpha for normal premultiplied-alpha drawing). Ignore it when enable_blend is false.
| BlendEquation blend_equation |
The mathematical equation used to combine the source and destination colors.
The library sets it on every draw command (Add for normal drawing). Ignore it when enable_blend is false.
| BlendFactor blend_src_factor |
The blend factor for the source color (pixel shader output).
This factor is multiplied with the source color before the blend equation is applied. The library sets it on every draw command (One for normal premultiplied-alpha drawing). Ignore it when enable_blend is false.
| Matrix4x4 clip[8] |
The clip stack (passed to the pixel shader via uniforms).
| uint8_t 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. This is 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.
| uint32_t render_buffer_id |
The render buffer to use for the current draw command.
| IntRect scissor_rect |
The scissor rect to use for scissor testing (units in pixels).
| ShaderType shader_type |
The vertex/pixel shader program pair to use for the current draw command.
| uint32_t texture_1_id |
The texture id to bind to slot #1. (Will be 0 if none).
| uint32_t texture_2_id |
The texture id to bind to slot #2. (Will be 0 if none).
| uint32_t texture_3_id |
The texture id to bind to slot #3. (Will be 0 if none).
| uint32_t texture_4_id |
The texture id to bind to slot #4.
(Will be 0 if none)
Set only on Photon draws: carries the RGBA16UI index/header page, which needs an integer texture view. The slot table on ShaderType::FillPhoton has the full binding contract.
| Matrix4x4 transform |
Transform matrix– you should multiply this with the screen-space orthographic projection matrix then pass to the vertex shader.
| int32_t uniform_integer[8] |
The uniform integers (passed to the pixel shader via uniforms).
| float uniform_scalar[8] |
The uniform scalars (passed to the pixel shader via uniforms).
| vec4 uniform_vector[8] |
The uniform vectors (passed to the pixel shader via uniforms).
| uint32_t viewport_height |
Viewport height in pixels.
| uint32_t viewport_width |
Viewport width in pixels.