|
Ultralight C API 2.0.0
|
#include <AppCore/CAPI/CAPI_GPUDriverAsync.h>
Options for ulCreateGPUDriverAsync().
Zero-initialize the struct and set struct_size to sizeof(ULGPUDriverAsyncOptions); a zeroed field means the default. Fields may be appended in later versions, so the library uses the size to know which of them you set.
Public Attributes | |
| unsigned int | struct_size |
| Set to sizeof(ULGPUDriverAsyncOptions). | |
| ULGPUDeviceCaps | caps |
| The capabilities your render thread supports (see ULGPUDeviceCaps). | |
| bool | supports_readback |
| Whether or not your render thread serves the readbacks in each frame (Default = False). | |
| unsigned int | max_frames_in_flight |
| The number of frames that may be queued or held by you at once before ulGPUDriverAsyncIsReadyForFrame() returns false (Default = 2). | |
| size_t | memory_budget |
| The memory, in bytes, that frames may hold before ulGPUDriverAsyncIsReadyForFrame() returns false (Default = 0, no limit). | |
| unsigned int | readback_timeout_ms |
| How long ulGPUDriverAsyncReadbackTexture() waits for your render thread, in milliseconds (Default = 1000). | |
| const ULGPUAllocator * | allocator |
| Your memory allocator (can be NULL to use the driver's own CPU memory). | |
| void * | user_data |
| Passed to the callbacks below (can be NULL). | |
| ULGPUDriverAsyncFrameQueuedCallback | on_frame_queued |
| Can be NULL. | |
| ULGPUDriverAsyncReadbackWaitCallback | on_readback_wait |
| Can be NULL. | |
| const ULGPUAllocator* allocator |
Your memory allocator (can be NULL to use the driver's own CPU memory).
The struct is copied, but its user data must stay valid until the driver is destroyed.
| ULGPUDeviceCaps caps |
The capabilities your render thread supports (see ULGPUDeviceCaps).
The library reads them once, so they're fixed for the driver's lifetime.
| unsigned int max_frames_in_flight |
The number of frames that may be queued or held by you at once before ulGPUDriverAsyncIsReadyForFrame() returns false (Default = 2).
| size_t memory_budget |
The memory, in bytes, that frames may hold before ulGPUDriverAsyncIsReadyForFrame() returns false (Default = 0, no limit).
| ULGPUDriverAsyncFrameQueuedCallback on_frame_queued |
Can be NULL.
| ULGPUDriverAsyncReadbackWaitCallback on_readback_wait |
Can be NULL.
| unsigned int readback_timeout_ms |
How long ulGPUDriverAsyncReadbackTexture() waits for your render thread, in milliseconds (Default = 1000).
Pass UL_GPU_DRIVER_ASYNC_NO_TIMEOUT to wait until it completes.
| unsigned int struct_size |
Set to sizeof(ULGPUDriverAsyncOptions).
| bool supports_readback |
Whether or not your render thread serves the readbacks in each frame (Default = False).
While false, ulGPUDriverAsyncReadbackTexture() returns false.
| void* user_data |
Passed to the callbacks below (can be NULL).