summaryrefslogtreecommitdiff
path: root/examples/game_demo/game_demo.c
diff options
context:
space:
mode:
authoromniscient <17525998+omnisci3nce@users.noreply.github.com>2024-08-11 23:00:26 +1000
committeromniscient <17525998+omnisci3nce@users.noreply.github.com>2024-08-11 23:00:26 +1000
commitb03bde3d412148cd573f5f14012cdd270f309947 (patch)
tree848af582079a60787cc5a5f8138e7ca6d508f2ee /examples/game_demo/game_demo.c
parent48a703e52490cb52fd32e54e3e37f7e70462a267 (diff)
starting work on immediate mode drawing
Diffstat (limited to 'examples/game_demo/game_demo.c')
-rw-r--r--examples/game_demo/game_demo.c24
1 files changed, 14 insertions, 10 deletions
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();