diff options
author | Joshua Rowe <17525998+omnisci3nce@users.noreply.github.com> | 2024-05-20 10:50:11 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-20 10:50:11 +1000 |
commit | e904c22003c3a134201b222e6619e782fbe63947 (patch) | |
tree | 5295c8ce5f855ca4a0f1bebe50beee80bae66682 /include/celeritas.h | |
parent | 02e84ee4d18e705e3362be1e327fdb6f1397a032 (diff) | |
parent | 73d4145f46d2305f45761b8e456df692d1962dfb (diff) |
Merge pull request #14 from omnisci3nce/realign
Realign
Diffstat (limited to 'include/celeritas.h')
-rw-r--r-- | include/celeritas.h | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/include/celeritas.h b/include/celeritas.h new file mode 100644 index 0000000..9ba741b --- /dev/null +++ b/include/celeritas.h @@ -0,0 +1,65 @@ +/** + * @file celeritas.h + * @author your name (you@domain.com) + * @brief + * @version 0.1 + * @date 2024-05-09 + * + * @copyright Copyright (c) 2024 + * + */ + +/* The Goal of this file is to test ocaml-bindgen on it to start moving development over into OCaml */ + +#include <stdbool.h> +#include <stdint.h> + + +// Forward Declarations +typedef struct core core; + +// Handles +typedef uint32_t model_handle; + +// Maths +typedef struct vec2 { float x, y; } vec2; +typedef struct vec3 { float x, y, z; } vec3; +typedef struct vec4 { float x, y, z, w; } vec4; +typedef struct mat4 { float data[16]; } mat4; +typedef struct transform3d { vec3 translation; vec4 rotation; float scale; } transform3d; + +// Lifecycle functions +void core_bringup(); +void core_shutdown(); +bool should_window_close(); + +void frame_begin(); +void frame_draw(); +void frame_end(); + +// Assets +model_handle model_load(const char* filepath); + +// Rendering +typedef struct render_entity { + model_handle model; + // TODO: material + transform3d transform; +} render_entity; + +void render_frame_begin(); + +// Scene +typedef struct directional_light {} directional_light; +typedef struct point_light {} point_light; +void scene_add_dir_light(directional_light light); +void scene_add_point_light(directional_light light); +void scene_add_model(model_handle model, transform3d transform); +bool scene_remove_model(model_handle model); + +void scene_set_model_transform(model_handle model, transform3d new_transform); +void scene_set_camera(vec3 pos, vec3 front); + +// Immediate mode drawing + +// Input
\ No newline at end of file |