examples: cleanup code duplication in examples/sokol/04_multi_shader_glsl/rt_glsl.v, document gg.m4 (#20978)

This commit is contained in:
Delyan Angelov 2024-03-08 11:39:23 +02:00 committed by GitHub
parent 8ddceabb0e
commit 4cf05083ca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 173 additions and 459 deletions

View file

@ -56,15 +56,14 @@ enum Viewer_state {
struct App {
mut:
gg &gg.Context = unsafe { nil }
pip_viewer sgl.Pipeline
texture gfx.Image
sampler gfx.Sampler
init_flag bool
frame_count int
mouse_x int = -1
mouse_y int = -1
scroll_y int
gg &gg.Context = unsafe { nil }
pip_viewer sgl.Pipeline
texture gfx.Image
sampler gfx.Sampler
init_flag bool
mouse_x int = -1
mouse_y int = -1
scroll_y int
state Viewer_state = .scanning
// translation
@ -563,7 +562,6 @@ fn frame(mut app App) {
}
app.gg.end()
app.frame_count++
}
// draw readable text