summaryrefslogtreecommitdiff
path: root/examples/cube/ex_cube.c
diff options
context:
space:
mode:
authorOmniscient <omniscient.oce@gmail.com>2024-05-18 23:53:11 +1000
committerOmniscient <omniscient.oce@gmail.com>2024-05-18 23:53:11 +1000
commitd79a8aa200bd64b14b85d2ec0c207601ba5c7922 (patch)
tree742c45019abe645355ec27a74924e1bec7963c7a /examples/cube/ex_cube.c
parentc69fab91c3cd8976ad660939765ca9a5e32a239a (diff)
working on image creation
Diffstat (limited to 'examples/cube/ex_cube.c')
-rw-r--r--examples/cube/ex_cube.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/cube/ex_cube.c b/examples/cube/ex_cube.c
index 7c7831d..264bf71 100644
--- a/examples/cube/ex_cube.c
+++ b/examples/cube/ex_cube.c
@@ -86,9 +86,14 @@ int main() {
};
gpu_pipeline* gfx_pipeline = gpu_graphics_pipeline_create(pipeline_description);
+ // Geometry
geometry_data cube_data = geo_create_cuboid(f32x3(1, 1, 1));
mesh cube = mesh_create(&cube_data, false);
+ // Texture
+ texture_data tex_data = texture_data_load("assets/textures/texture.jpg", false);
+ texture_handle texture = texture_data_upload(tex_data, true);
+
// Main loop
while (!should_exit(&g_core)) {
input_update(&g_core.input);