Context Object
This section describes the Thallium context object and relevant functions.
Types
Objects
-
typedef struct TL_Context_t TL_Context_t
An opaque object to hold single context state for the Thallium library instance.
This opaque struct holds context state for the application. There can only be one context per program.
‘Context state’ refers to any single API-specific objects, such as Vulkan instances. As having multiple of these objects in an application is messy, it is avoided by restricting the creation of a Thallium context to only one.
See also
See also
See also
Descriptors
-
struct TL_ContextDescriptor_t
A structure describing a Thallium context object to be created with TL_ContextCreate().
This structure describes a context object to be created.
See also
TL_Context_t
See also
See also
Public Members
-
const TL_DebuggerAttachmentDescriptor_t *debug_attachment_descriptor
NULL or a descriptor describing a debug attachment for the context.
-
const TL_DebuggerAttachmentDescriptor_t *debug_attachment_descriptor
Functions
-
TL_Context_t *TL_ContextCreate(const TL_ContextDescriptor_t context_descriptor, const TL_Debugger_t *const debugger)
Allocate space for and create a Thallium context object.
This function creates a heap-allocated opaque Thallium context object and returns its handle.
See also
TL_Context_t
See also
- Parameters:
context_descriptor – Context descriptor
debugger – NULL or a debugger for function debugging
- Returns:
Handle to the new Thallium context
-
void TL_ContextDestroy(TL_Context_t *const context)
Free space allocated for the given Thallium context object.
This function frees the space allocated for the given Thallium context object with TL_ContextCreate,
See also
TL_Context_t
See also
- Parameters:
context – Context object to destroy