@@ -73,7 +73,7 @@ typedef struct
73
73
pg_camera camera ; // align: 4
74
74
} application_state ;
75
75
76
- GLOBAL pg_config config = {.input_gamepad_count = 1 ,
76
+ GLOBAL pg_config config = {.gamepad_count = 1 ,
77
77
.input_repeat_rate = 750.0f ,
78
78
.fixed_time_step = (1.0f / 480.0f ) * PG_MS_IN_S ,
79
79
.permanent_mem_size = 1250u * PG_MEBIBYTE ,
@@ -268,6 +268,7 @@ FUNCTION void
268
268
update_app (pg_assets * assets ,
269
269
pg_input * input ,
270
270
pg_f32_2x previous_cursor_position ,
271
+ pg_f32_2x render_res ,
271
272
pg_mesh * * meshes ,
272
273
u32 * mesh_count ,
273
274
pg_dynamic_cb_data * dynamic_cb_data ,
@@ -376,17 +377,17 @@ update_app(pg_assets* assets,
376
377
377
378
pg_f32_4x4 world_from_model
378
379
= pg_f32_4x4_world_from_model (model_scaling [app_state .art_id ],
379
- app_state .rotation ,
380
- (pg_f32_3x ){0 });
380
+ app_state .rotation ,
381
+ (pg_f32_3x ){0 });
381
382
pg_f32_4x4 view_from_world
382
383
= pg_f32_4x4_view_from_world (camera_position ,
383
384
app_state .camera .focal_point ,
384
385
app_state .camera .up_axis );
385
- pg_f32_4x4 clip_from_view
386
- = pg_f32_4x4_clip_from_view_perspective ( 27.0f ,
387
- 16.0f / 9.0f ,
388
- 0.1f ,
389
- 100.0f );
386
+ pg_f32_4x4 clip_from_view = pg_f32_4x4_clip_from_view_perspective (
387
+ 27.0f ,
388
+ render_res . width / render_res . height ,
389
+ 0.1f ,
390
+ 100.0f );
390
391
391
392
pg_assets_get_meshes (assets ,
392
393
& app_state .art_id ,
@@ -470,6 +471,7 @@ wWinMain(HINSTANCE inst, HINSTANCE prev_inst, WCHAR* cmd_args, s32 show_code)
470
471
update_app (& assets ,
471
472
& windows .input ,
472
473
previous_cursor_position ,
474
+ windows .window .render_res ,
473
475
& meshes ,
474
476
& mesh_count ,
475
477
& dynamic_cb_data ,
0 commit comments