ren_bool ren_library_init( |
RenError** error) ; |
Initialize the library. This must be called before any other library
function is called. If it returns FALSE
, do not
continue using the library.
void ren_library_exit( |
void) ; |
Finalize the library. No library function must be called after this point. It's not possible to initialize it again. Typically this will be called shortly before exiting the program.
RenBackend* ren_backend_lookup( |
const char* name, |
RenError** error) ; |
Try to find a backend. If the backend is available for use it will be
returned and its use count is increased. When you don't need the backend
loaded anymore, use ren_backend_unuse
. If the
backend is not available for use then NULL will be returned (with
*error
set to point to a RenError with error
information).
ren_bool ren_backend_use( |
RenBackend* backend, |
RenError** error) ; |
Increases the use count of the Reindeer backend. If the backend was
previously unloaded (use count was zero), this will also load it.
Returns TRUE
if successful, and
FALSE
if not (with *error
set to point to a RenError with error information).
void ren_backend_unuse( |
RenBackend* backend) ; |
Decreases the use count of the Reindeer backend. When its use count drops to 0, it will be unloaded automatically.
RenReindeer* ren_reindeer_new( |
RenBackend* backend) ; |
Load a Reindeer context for a backend. Note that Reindeer contexts are not necessarily equivalent to the contexts of the target API. However, usually one wants to pair them. Backends should mention in their respective reference manuals how one is supposed to set up Reindeer contexts with it and how they work together with the native contexts of the backend.
Some Reindeer functions will take a Reindeer context. It is often the case that the backend must be in a certain state before those calls are valid. For example, OpenGL needs to have the associated OpenGL context current. These functions will be marked with "virtual" in their descriptions.
RenReindeer* ren_reindeer_ref( |
RenReindeer* r) ; |
Increases the reference count of the Reindeer context and then returns it.
void ren_reindeer_unref( |
RenReindeer* r) ; |
Decreases the reference count of the Reindeer context. When its reference count drops to 0, it will be destroyed automatically.
RenBackend* ren_reindeer_backend( |
RenReindeer* r) ; |
Get the backend a Reindeer context uses.
virtual ren_bool ren_init( |
RenReindeer* r) ; |
Virtual function to initialize a Reindeer context. This must be called before any other virtual Reindeer context function.