mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
examples: fix more compilation errors with -cstrict -cc clang-18
for the sokol examples
This commit is contained in:
parent
86740bb0a7
commit
3a331e01e0
4 changed files with 9 additions and 9 deletions
|
@ -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{}
|
||||||
|
|
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue