summaryrefslogtreecommitdiff
path: root/src/renderer/archive/render.h
diff options
context:
space:
mode:
authorJoshua Rowe <17525998+omnisci3nce@users.noreply.github.com>2024-05-20 10:50:11 +1000
committerGitHub <noreply@github.com>2024-05-20 10:50:11 +1000
commite904c22003c3a134201b222e6619e782fbe63947 (patch)
tree5295c8ce5f855ca4a0f1bebe50beee80bae66682 /src/renderer/archive/render.h
parent02e84ee4d18e705e3362be1e327fdb6f1397a032 (diff)
parent73d4145f46d2305f45761b8e456df692d1962dfb (diff)
Merge pull request #14 from omnisci3nce/realign
Realign
Diffstat (limited to 'src/renderer/archive/render.h')
-rw-r--r--src/renderer/archive/render.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/renderer/archive/render.h b/src/renderer/archive/render.h
new file mode 100644
index 0000000..31cf3b0
--- /dev/null
+++ b/src/renderer/archive/render.h
@@ -0,0 +1,46 @@
+/**
+ * @file render.h
+ * @author your name (you@domain.com)
+ * @brief Renderer frontend
+ * @version 0.1
+ * @date 2024-03-21
+ *
+ * @copyright Copyright (c) 2024
+ *
+ */
+#pragma once
+
+#include "camera.h"
+#include "loaders.h"
+#include "render_types.h"
+#include "transform_hierarchy.h"
+
+// --- Lifecycle
+/** @brief initialise the render system frontend */
+bool renderer_init(renderer* ren);
+/** @brief shutdown the render system frontend */
+void renderer_shutdown(renderer* ren);
+
+void renderer_on_resize(renderer* ren);
+
+struct render_packet;
+
+// --- Frame
+
+void render_frame_begin(renderer* ren);
+void render_frame_end(renderer* ren);
+void render_frame_draw(renderer* ren);
+
+// --- models meshes
+void model_upload_meshes(renderer* ren, model* model);
+void draw_model(renderer* ren, camera* camera, model* model, mat4* tf, scene* scene);
+void draw_mesh(renderer* ren, mesh* mesh, mat4* tf, material* mat, mat4* view, mat4* proj);
+void draw_scene(arena* frame, model_darray* models, renderer* ren, camera* camera,
+ transform_hierarchy* tfh, scene* scene);
+
+void draw_skinned_model(renderer* ren, camera* cam, model* model, transform tf, scene* scene);
+
+void model_destroy(model* model);
+
+// ---
+texture texture_data_load(const char* path, bool invert_y); // #frontend