all: fix typos (#19634)

This commit is contained in:
Turiiya 2023-10-23 20:21:15 +02:00 committed by GitHub
parent 407adaa3c1
commit 9051ac8921
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
108 changed files with 235 additions and 214 deletions

View file

@ -278,12 +278,12 @@ fn draw_cube_glsl(app App) {
tr_matrix := calc_tr_matrices(dw, dh, 0, 0, 2.3)
gfx.apply_viewport(0, 0, ws.width, ws.height, true)
// apply the pipline and bindings
// apply the pipeline and bindings
gfx.apply_pipeline(app.cube_pip_glsl)
gfx.apply_bindings(app.cube_bind)
// Uniforms
// *** vertex shadeer uniforms ***
// *** vertex shader uniforms ***
// passing the view matrix as uniform
// res is a 4x4 matrix of f32 thus: 4*16 byte of size
vs_uniforms_range := gfx.Range{
@ -292,20 +292,18 @@ fn draw_cube_glsl(app App) {
}
gfx.apply_uniforms(.vs, C.SLOT_vs_params, &vs_uniforms_range)
// vfmt off
// *** fragment shader uniforms ***
time_ticks := f32(time.ticks() - app.ticks) / 1000
mut tmp_fs_params := [
f32(ws.width),
ws.height * ratio, // x,y resolution to pass to FS
app.mouse_x, // mouse x
ws.height * ratio, // x,y resolution to pass to FS
app.mouse_x, // mouse x
ws.height - app.mouse_y * 2, // mouse y scaled
time_ticks, // time as f32
app.frame_count, // frame count
time_ticks, // time as f32
app.frame_count, // frame count
0,
0 // padding bytes , see "fs_params" struct paddings in rt_glsl.h
0, // padding bytes , see "fs_params" struct paddings in rt_glsl.h
]!
// vfmt on
fs_uniforms_range := gfx.Range{
ptr: unsafe { &tmp_fs_params }
size: usize(sizeof(tmp_fs_params))