summaryrefslogtreecommitdiff
path: root/examples/primitives/ex_primitives.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/primitives/ex_primitives.c')
-rw-r--r--examples/primitives/ex_primitives.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/primitives/ex_primitives.c b/examples/primitives/ex_primitives.c
index 2109215..d39c0d1 100644
--- a/examples/primitives/ex_primitives.c
+++ b/examples/primitives/ex_primitives.c
@@ -30,6 +30,9 @@ int main() {
geometry_data sphere_data = geo_create_uvsphere(1.0, 8, 8);
mesh sphere = mesh_create(&sphere_data, false);
+ geometry_data plane_data = geo_create_plane(f32x2(6,4));
+ mesh plane = mesh_create(&plane_data, false);
+
// FIXME: // Texture
// texture_data tex_data = texture_data_load("assets/textures/texture.jpg", false);
// texture_handle texture = texture_data_upload(tex_data, true);
@@ -51,8 +54,10 @@ int main() {
mat4 sphere_model = transform_to_mat(&transform);
mat4 cube_model = mat4_translation(vec3(-2., 0, 0));
+ mat4 plane_model = mat4_translation(vec3(0,-2,0));
draw_mesh(&cube, &cube_model, &cam);
draw_mesh(&sphere, &sphere_model, &cam);
+ draw_mesh(&plane, &plane_model, &cam);
render_frame_end(&g_core.renderer);
}