Skip to content

Commit 77b8097

Browse files
committed
examples: cleanup the glsl includes in the sokol examples
1 parent 4f7476e commit 77b8097

File tree

6 files changed

+7
-13
lines changed

6 files changed

+7
-13
lines changed

examples/sokol/02_cubes_glsl/cube_glsl.v

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ import time
2323
import gg.m4
2424

2525
// GLSL Include and functions
26-
#flag -I @VMODROOT/.
27-
#include "cube_glsl.h" # Should be generated with `v shader .` (see the instructions at the top of this file)
26+
#include "@VMODROOT/cube_glsl.h" # It should be generated with `v shader .` (see the instructions at the top of this file)
2827

2928
fn C.cube_shader_desc(gfx.Backend) &gfx.ShaderDesc
3029

examples/sokol/03_march_tracing_glsl/rt_glsl.v

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ import time
2424

2525
// GLSL Include and functions
2626

27-
#flag -I @VMODROOT/.
28-
#include "rt_glsl.h" # Should be generated with `v shader .` (see the instructions at the top of this file)
27+
#include "@VMODROOT/rt_glsl.h" # It should be generated with `v shader .` (see the instructions at the top of this file)
2928

3029
fn C.rt_shader_desc(gfx.Backend) &gfx.ShaderDesc
3130

examples/sokol/04_multi_shader_glsl/rt_glsl.v

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,8 @@ import sokol.sgl
2323
import time
2424

2525
// GLSL Include and functions
26-
#flag -I @VMODROOT/.
27-
#include "rt_glsl_march.h" # Should be generated with `v shader .` (see the instructions at the top of this file)
28-
#include "rt_glsl_puppy.h" # Should be generated with `v shader .` (see the instructions at the top of this file)
26+
#include "@VMODROOT/rt_glsl_march.h" # It should be generated with `v shader .` (see the instructions at the top of this file)
27+
#include "@VMODROOT/rt_glsl_puppy.h" # It should be generated with `v shader .` (see the instructions at the top of this file)
2928

3029
fn C.rt_march_shader_desc(gfx.Backend) &gfx.ShaderDesc
3130
fn C.rt_puppy_shader_desc(gfx.Backend) &gfx.ShaderDesc

examples/sokol/05_instancing_glsl/rt_glsl.v

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ mut:
5555
/******************************************************************************
5656
* GLSL Include and functions
5757
******************************************************************************/
58-
#flag -I @VMODROOT/.
59-
#include "rt_glsl_instancing.h" # Should be generated with `v shader .` (see the instructions at the top of this file)
58+
#include "@VMODROOT/rt_glsl_instancing.h" # It should be generated with `v shader .` (see the instructions at the top of this file)
6059

6160
fn C.instancing_shader_desc(gfx.Backend) &gfx.ShaderDesc
6261

examples/sokol/06_obj_viewer/show_obj.v

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ import obj
3232

3333
// GLSL Include and functions
3434

35-
#flag -I @VMODROOT/.
36-
#include "gouraud.h" # Should be generated with `v shader .` (see the instructions at the top of this file)
35+
#include "@VMODROOT/gouraud.h" # It should be generated with `v shader .` (see the instructions at the top of this file)
3736

3837
fn C.gouraud_shader_desc(gfx.Backend) &gfx.ShaderDesc
3938

examples/sokol/simple_shader_glsl/simple_shader.v

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ import sokol.gfx
99
// Use `v shader` or `sokol-shdc` to generate the necessary `.h` file
1010
// Using `v shader -v .` in this directory will show some additional
1111
// info - and what you should include to make things work.
12-
#flag -I @VMODROOT/.
13-
#include "simple_shader.h"
12+
#include "@VMODROOT/simple_shader.h" # # It should be generated with `v shader .`
1413

1514
// simple_shader_desc is a C function declaration defined by
1615
// the `@program` entry in the `simple_shader.glsl` shader file.

0 commit comments

Comments
 (0)