mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
examples: cleanup the glsl includes in the sokol examples
This commit is contained in:
parent
4f7476eaa3
commit
77b8097f51
6 changed files with 7 additions and 13 deletions
|
@ -23,8 +23,7 @@ import time
|
||||||
import gg.m4
|
import gg.m4
|
||||||
|
|
||||||
// GLSL Include and functions
|
// GLSL Include and functions
|
||||||
#flag -I @VMODROOT/.
|
#include "@VMODROOT/cube_glsl.h" # It should be generated with `v shader .` (see the instructions at the top of this file)
|
||||||
#include "cube_glsl.h" # Should be generated with `v shader .` (see the instructions at the top of this file)
|
|
||||||
|
|
||||||
fn C.cube_shader_desc(gfx.Backend) &gfx.ShaderDesc
|
fn C.cube_shader_desc(gfx.Backend) &gfx.ShaderDesc
|
||||||
|
|
||||||
|
|
|
@ -24,8 +24,7 @@ import time
|
||||||
|
|
||||||
// GLSL Include and functions
|
// GLSL Include and functions
|
||||||
|
|
||||||
#flag -I @VMODROOT/.
|
#include "@VMODROOT/rt_glsl.h" # It should be generated with `v shader .` (see the instructions at the top of this file)
|
||||||
#include "rt_glsl.h" # Should be generated with `v shader .` (see the instructions at the top of this file)
|
|
||||||
|
|
||||||
fn C.rt_shader_desc(gfx.Backend) &gfx.ShaderDesc
|
fn C.rt_shader_desc(gfx.Backend) &gfx.ShaderDesc
|
||||||
|
|
||||||
|
|
|
@ -23,9 +23,8 @@ import sokol.sgl
|
||||||
import time
|
import time
|
||||||
|
|
||||||
// GLSL Include and functions
|
// GLSL Include and functions
|
||||||
#flag -I @VMODROOT/.
|
#include "@VMODROOT/rt_glsl_march.h" # It should be generated with `v shader .` (see the instructions at the top of this file)
|
||||||
#include "rt_glsl_march.h" # Should be generated with `v shader .` (see the instructions at the top of this file)
|
#include "@VMODROOT/rt_glsl_puppy.h" # It should be generated with `v shader .` (see the instructions at the top of this file)
|
||||||
#include "rt_glsl_puppy.h" # Should be generated with `v shader .` (see the instructions at the top of this file)
|
|
||||||
|
|
||||||
fn C.rt_march_shader_desc(gfx.Backend) &gfx.ShaderDesc
|
fn C.rt_march_shader_desc(gfx.Backend) &gfx.ShaderDesc
|
||||||
fn C.rt_puppy_shader_desc(gfx.Backend) &gfx.ShaderDesc
|
fn C.rt_puppy_shader_desc(gfx.Backend) &gfx.ShaderDesc
|
||||||
|
|
|
@ -55,8 +55,7 @@ mut:
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* GLSL Include and functions
|
* GLSL Include and functions
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
#flag -I @VMODROOT/.
|
#include "@VMODROOT/rt_glsl_instancing.h" # It should be generated with `v shader .` (see the instructions at the top of this file)
|
||||||
#include "rt_glsl_instancing.h" # Should be generated with `v shader .` (see the instructions at the top of this file)
|
|
||||||
|
|
||||||
fn C.instancing_shader_desc(gfx.Backend) &gfx.ShaderDesc
|
fn C.instancing_shader_desc(gfx.Backend) &gfx.ShaderDesc
|
||||||
|
|
||||||
|
|
|
@ -32,8 +32,7 @@ import obj
|
||||||
|
|
||||||
// GLSL Include and functions
|
// GLSL Include and functions
|
||||||
|
|
||||||
#flag -I @VMODROOT/.
|
#include "@VMODROOT/gouraud.h" # It should be generated with `v shader .` (see the instructions at the top of this file)
|
||||||
#include "gouraud.h" # Should be generated with `v shader .` (see the instructions at the top of this file)
|
|
||||||
|
|
||||||
fn C.gouraud_shader_desc(gfx.Backend) &gfx.ShaderDesc
|
fn C.gouraud_shader_desc(gfx.Backend) &gfx.ShaderDesc
|
||||||
|
|
||||||
|
|
|
@ -9,8 +9,7 @@ import sokol.gfx
|
||||||
// Use `v shader` or `sokol-shdc` to generate the necessary `.h` file
|
// Use `v shader` or `sokol-shdc` to generate the necessary `.h` file
|
||||||
// Using `v shader -v .` in this directory will show some additional
|
// Using `v shader -v .` in this directory will show some additional
|
||||||
// info - and what you should include to make things work.
|
// info - and what you should include to make things work.
|
||||||
#flag -I @VMODROOT/.
|
#include "@VMODROOT/simple_shader.h" # # It should be generated with `v shader .`
|
||||||
#include "simple_shader.h"
|
|
||||||
|
|
||||||
// simple_shader_desc is a C function declaration defined by
|
// simple_shader_desc is a C function declaration defined by
|
||||||
// the `@program` entry in the `simple_shader.glsl` shader file.
|
// the `@program` entry in the `simple_shader.glsl` shader file.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue