|
Ultralight C++ API 2.0.0
|
#include <Ultralight/platform/GPUDriver.h>
Optional capabilities reported by a GPUDriver.
The library zero-initializes this structure and passes it to GPUDriver::GetDeviceCaps(). Your driver fills in what it supports.
A capability field left at zero means the feature is not supported.
A limit field left at zero uses the library's built-in default.
Leaving a capability unset still produces correct output, but it can reduce performance– for example, leaving supports_partial_redraw unset forces the library to redraw the whole View on every composite.
Public Attributes | |
| uint32_t | compressed_formats |
| Bitmask of supported compressed-texture families (see GPUCompressedFormat). | |
| uint32_t | supports_msaa |
| Nonzero if this driver can allocate multisampled (antialiased) render targets (see kGPUTextureFlag_Antialiased). | |
| uint32_t | max_texture_dimension |
| The largest width or height, in pixels, of a texture or render target this driver can create. | |
| uint32_t | max_msaa_samples |
| The sample count this driver uses for multisampled render targets (see supports_msaa), reported so the engine can account their memory. | |
| uint32_t | max_geometry_size |
| The largest size, in bytes, of a single vertex or index buffer the engine will build for this driver. | |
| uint32_t | supports_partial_redraw |
| Whether or not the library may redraw only the changed region of a View's render target. | |
| uint32_t compressed_formats |
Bitmask of supported compressed-texture families (see GPUCompressedFormat).
Zero means no block-compressed formats are supported; such textures are decompressed before upload.
| uint32_t max_geometry_size |
The largest size, in bytes, of a single vertex or index buffer the engine will build for this driver.
A path whose tessellated geometry would exceed this is dropped rather than uploaded, so the driver never receives an oversized CreateGeometry / UpdateGeometry.
| uint32_t max_msaa_samples |
The sample count this driver uses for multisampled render targets (see supports_msaa), reported so the engine can account their memory.
| uint32_t max_texture_dimension |
The largest width or height, in pixels, of a texture or render target this driver can create.
The engine will not ask you to create one whose width or height exceeds this value.
| uint32_t supports_msaa |
Nonzero if this driver can allocate multisampled (antialiased) render targets (see kGPUTextureFlag_Antialiased).
Zero (the default) means it only creates single-sample targets.
| uint32_t supports_partial_redraw |
Whether or not the library may redraw only the changed region of a View's render target.
When set to 1, each composite redraws only the region of the View that changed. GPU cost follows the changed area.
When set to 0 (the default), every composite with changes clears and redraws the entire View target, even for a small change. Frames where nothing changed are still skipped. GPU cost follows the size of the View.
Set this to 1 when the View's render target keeps its contents between frames. All reference drivers set this to 1.