|
vgl 1.0.0
Virtual Globe Library: API reference
|
#include <vgl/foundation.h>
Public Attributes | |
| uint32_t | version |
| uint32_t | reserved |
| void * | user_data |
| vgl_result(* | submit )(void *user_data, vgl_task_fn function, void *task_data) |
| void(* | destroy )(void *user_data) |
Host task scheduling (design document, section 7.5). The library submits decoding work, which the host runs on any of its threads. Without a task interface, vgl_context_update does that work itself, within its time budget.
| uint32_t vgl_task_interface::version |
VGL_TASK_INTERFACE_VERSION
| uint32_t vgl_task_interface::reserved |
| void* vgl_task_interface::user_data |
| vgl_result(* vgl_task_interface::submit) (void *user_data, vgl_task_fn function, void *task_data) |
Runs function(task_data) exactly once, on any thread, now or later. Returns VGL_RESULT_SUCCESS if the task was accepted; for any other result the library does the work itself, and function is never called. Tasks never block on each other or on the host.
Thread safety: calling thread, inside the context's functions.
| void(* vgl_task_interface::destroy) (void *user_data) |
Optional. Called once, while the context is destroyed. Tasks may still be queued; the host must run them, now or later, and they return without doing work.
Thread safety: calling thread, inside vgl_context_destroy.