1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

sokol: use V type for SG_SHADERSTAGE_[VS|FS] (#13086)

This commit is contained in:
Larpon
2022-01-07 18:52:44 +01:00
committed by GitHub
parent 5717066147
commit 5cffa1a2e4
6 changed files with 14 additions and 14 deletions

View File

@ -324,7 +324,7 @@ fn draw_cube_glsl_i(mut app App){
ptr: unsafe { &tr_matrix }
size: usize(4 * 16)
}
gfx.apply_uniforms(C.SG_SHADERSTAGE_VS, C.SLOT_vs_params_i, &vs_uniforms_range)
gfx.apply_uniforms(.vs, C.SLOT_vs_params_i, &vs_uniforms_range)
/*
// *** fragment shader uniforms ***
@ -342,7 +342,7 @@ fn draw_cube_glsl_i(mut app App){
ptr: unsafe { &tmp_fs_params }
size: usize(sizeof(tmp_fs_params))
}
gfx.apply_uniforms(C.SG_SHADERSTAGE_FS, C.SLOT_fs_params, &fs_uniforms_range)
gfx.apply_uniforms(.fs, C.SLOT_fs_params, &fs_uniforms_range)
*/
// 3 vertices for triangle * 2 triangles per face * 6 faces = 36 vertices to draw for num_inst times
gfx.draw(0, (3 * 2) * 6, num_inst)