summaryrefslogtreecommitdiff
path: root/src/renderer/render.h
diff options
context:
space:
mode:
authorJoshua Rowe <17525998+omnisci3nce@users.noreply.github.com>2024-03-14 22:08:43 +1100
committerGitHub <noreply@github.com>2024-03-14 22:08:43 +1100
commit70308798adbaa376da97c9c0739d437fe76b8b36 (patch)
tree09836fab6ddc9012a5f4437f2139ab0a704b3a78 /src/renderer/render.h
parenta627f75cc956a463e3910a8f5f615932bad3a418 (diff)
parentb240374c23365e33727d78ca74e901bcb383e077 (diff)
Merge pull request #5 from omnisci3nce/cel-41-port-over-a-basic-3d-scene-example
CEL 41 port over a basic 3d scene example
Diffstat (limited to 'src/renderer/render.h')
-rw-r--r--src/renderer/render.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/renderer/render.h b/src/renderer/render.h
index c89c364..10702e3 100644
--- a/src/renderer/render.h
+++ b/src/renderer/render.h
@@ -1,5 +1,7 @@
#pragma once
+#include "camera.h"
+#include "loaders.h"
#include "render_types.h"
// --- Lifecycle
@@ -13,4 +15,22 @@ void renderer_shutdown(renderer* ren);
void render_frame_begin(renderer* ren);
void render_frame_end(renderer* ren);
-// --- \ No newline at end of file
+// --- models meshes
+void model_upload_meshes(renderer* ren, model* model);
+void draw_model(renderer* ren, camera* camera, model* model, transform tf, scene* scene);
+void draw_mesh(renderer* ren, mesh* mesh, transform tf, material* mat, mat4* view, mat4* proj);
+
+// ---
+texture texture_data_load(const char* path, bool invert_y); // #frontend
+void texture_data_upload(texture* tex); // #backend
+
+// --- Uniforms
+
+/** @brief upload a vec3 of f32 to a uniform */
+void uniform_vec3f(u32 program_id, const char* uniform_name, vec3* value);
+/** @brief upload a single f32 to a uniform */
+void uniform_f32(u32 program_id, const char* uniform_name, f32 value);
+/** @brief upload a integer to a uniform */
+void uniform_i32(u32 program_id, const char* uniform_name, i32 value);
+/** @brief upload a mat4 of f32 to a uniform */
+void uniform_mat4f(u32 program_id, const char* uniform_name, mat4* value); \ No newline at end of file