examples: fix more compilation errors with -cstrict -cc clang-18 for the sokol examples

This commit is contained in:
Delyan Angelov 2025-03-06 19:01:48 +02:00
parent 86740bb0a7
commit 3a331e01e0
No known key found for this signature in database
GPG key ID: 66886C0F12D595ED
4 changed files with 9 additions and 9 deletions

View file

@ -58,8 +58,8 @@ fn (mut a App) run() {
user_data: a user_data: a
init_userdata_cb: init init_userdata_cb: init
frame_userdata_cb: frame frame_userdata_cb: frame
window_title: title.str window_title: &char(title.str)
html5_canvas_name: title.str html5_canvas_name: &char(title.str)
cleanup_userdata_cb: cleanup cleanup_userdata_cb: cleanup
sample_count: 4 // Enables MSAA (Multisample anti-aliasing) x4 on rendered output, this can be omitted. sample_count: 4 // Enables MSAA (Multisample anti-aliasing) x4 on rendered output, this can be omitted.
} }
@ -110,7 +110,7 @@ fn init(user_data voidptr) {
// Note the function `C.simple_shader_desc()` (also defined above) - this is // Note the function `C.simple_shader_desc()` (also defined above) - this is
// the function that returns the compiled shader code/desciption we have // the function that returns the compiled shader code/desciption we have
// written in `simple_shader.glsl` and compiled with `v shader .` (`sokol-shdc`). // written in `simple_shader.glsl` and compiled with `v shader .` (`sokol-shdc`).
shader := gfx.make_shader(C.simple_shader_desc(gfx.query_backend())) shader := gfx.make_shader(voidptr(C.simple_shader_desc(gfx.query_backend())))
// Create a pipeline object (default render states are fine for triangle) // Create a pipeline object (default render states are fine for triangle)
mut pipeline_desc := gfx.PipelineDesc{} mut pipeline_desc := gfx.PipelineDesc{}

View file

@ -17,8 +17,8 @@ fn main() {
user_data: state user_data: state
init_userdata_cb: init init_userdata_cb: init
frame_userdata_cb: frame frame_userdata_cb: frame
window_title: title.str window_title: &char(title.str)
html5_canvas_name: title.str html5_canvas_name: &char(title.str)
} }
sapp.run(&desc) sapp.run(&desc)
} }

View file

@ -22,8 +22,8 @@ fn main() {
user_data: state user_data: state
init_userdata_cb: init init_userdata_cb: init
frame_userdata_cb: frame frame_userdata_cb: frame
window_title: title.str window_title: &char(title.str)
html5_canvas_name: title.str html5_canvas_name: &char(title.str)
} }
sapp.run(&desc) sapp.run(&desc)
} }

View file

@ -80,8 +80,8 @@ fn main() {
user_data: state user_data: state
init_userdata_cb: init init_userdata_cb: init
frame_userdata_cb: frame frame_userdata_cb: frame
window_title: title.str window_title: &char(title.str)
html5_canvas_name: title.str html5_canvas_name: &char(title.str)
width: 600 width: 600
height: 700 height: 700
high_dpi: true high_dpi: true