From b03bde3d412148cd573f5f14012cdd270f309947 Mon Sep 17 00:00:00 2001 From: omniscient <17525998+omnisci3nce@users.noreply.github.com> Date: Sun, 11 Aug 2024 23:00:26 +1000 Subject: starting work on immediate mode drawing --- examples/game_demo/game_demo.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'examples/game_demo/game_demo.c') diff --git a/examples/game_demo/game_demo.c b/examples/game_demo/game_demo.c index bc7e0f6..22af64e 100644 --- a/examples/game_demo/game_demo.c +++ b/examples/game_demo/game_demo.c @@ -7,10 +7,12 @@ #include "camera.h" #include "core.h" #include "grid.h" +#include "immdraw.h" #include "input.h" #include "keys.h" #include "loaders.h" #include "maths.h" +#include "maths_types.h" #include "pbr.h" #include "primitives.h" #include "ral_types.h" @@ -98,21 +100,23 @@ int main() { // BEGIN Draw calls RenderEnt_darray_clear(render_entities); // we re-extract every frame - Quat rot = quat_from_axis_angle(VEC3_X, -HALF_PI, true); + // Quat rot = quat_from_axis_angle(VEC3_X, -HALF_PI, true); // Mat4 affine = mat4_rotation(rot); Mat4 affine = mat4_ident(); ModelExtractRenderEnts(render_entities, cube_handle, affine, REND_ENT_CASTS_SHADOWS); // Shadow_Run(entities, entity_count); - - if (draw_debug) { - // draw the player model with shadows - Render_RenderEntities(render_entities->data, render_entities->len); - // Render_DrawTerrain(); - Skybox_Draw(&skybox, cam); - } else { - Shadow_DrawDebugQuad(); - } + Quat rot = quat_from_axis_angle(VEC3_X, HALF_PI, true); + Immdraw_Sphere(transform_create(VEC3_ZERO, rot, 1.0), 1.0, vec4(1.0, 0.0, 0.0, 1.0), false); + + // if (draw_debug) { + // // draw the player model with shadows + // Render_RenderEntities(render_entities->data, render_entities->len); + // // Render_DrawTerrain(); + // Skybox_Draw(&skybox, cam); + // } else { + // Shadow_DrawDebugQuad(); + // } // Terrain_Draw(terrain); // Grid_Draw(); -- cgit v1.2.3-70-g09d2