The camera system is responsible for managing cameras throughout the engine.
More...
Go to the source code of this file.
|
b8 | camera_system_initialize (u64 *memory_requirement, void *state, void *config) |
| Initializes the camera system. Should be called twice; once to get the memory requirement (passing state=0), and a second time passing an allocated block of memory to actually initialize the system. More...
|
|
void | camera_system_shutdown (void *state) |
| Shuts down the geometry camera. More...
|
|
KAPI camera * | camera_system_acquire (const char *name) |
| Acquires a pointer to a camera by name. If one is not found, a new one is created and retuned. Internal reference counter is incremented. More...
|
|
KAPI void | camera_system_release (const char *name) |
| Releases a camera with the given name. Intenral reference counter is decremented. If this reaches 0, the camera is reset, and the reference is usable by a new camera. More...
|
|
KAPI camera * | camera_system_get_default (void) |
| Gets a pointer to the default camera. More...
|
|
The camera system is responsible for managing cameras throughout the engine.
- Author
- Travis Vroman (travi.nosp@m.s@ko.nosp@m.hieng.nosp@m.ine..nosp@m.com)
- Version
- 1.0
- Date
- 2022-05-21
- Copyright
- Kohi Game Engine is Copyright (c) Travis Vroman 2021-2022
◆ DEFAULT_CAMERA_NAME
#define DEFAULT_CAMERA_NAME "default" |
The name of the default camera.
◆ camera_system_config
The camera system configuration.
◆ camera_system_acquire()
KAPI camera* camera_system_acquire |
( |
const char * |
name | ) |
|
Acquires a pointer to a camera by name. If one is not found, a new one is created and retuned. Internal reference counter is incremented.
- Parameters
-
name | The name of the camera to acquire. |
- Returns
- A pointer to a camera if successful; 0 if an error occurs.
◆ camera_system_get_default()
Gets a pointer to the default camera.
- Returns
- A pointer to the default camera.
◆ camera_system_initialize()
b8 camera_system_initialize |
( |
u64 * |
memory_requirement, |
|
|
void * |
state, |
|
|
void * |
config |
|
) |
| |
Initializes the camera system. Should be called twice; once to get the memory requirement (passing state=0), and a second time passing an allocated block of memory to actually initialize the system.
- Parameters
-
memory_requirement | A pointer to hold the memory requirement as it is calculated. |
state | A block of memory to hold the state or, if gathering the memory requirement, 0. |
config | The configuration (camera_system_config) for this system. |
- Returns
- True on success; otherwise false.
◆ camera_system_release()
KAPI void camera_system_release |
( |
const char * |
name | ) |
|
Releases a camera with the given name. Intenral reference counter is decremented. If this reaches 0, the camera is reset, and the reference is usable by a new camera.
- Parameters
-
name | The name of the camera to release. |
◆ camera_system_shutdown()
void camera_system_shutdown |
( |
void * |
state | ) |
|
Shuts down the geometry camera.
- Parameters
-
state | The state block of memory. |