change shader properties to be vg_msg based
[carveJwlIkooP6JGAAIwe30JlM.git] / shaders / scene_terrain.h
1 #pragma once
2 #include "vg/vg_engine.h"
3 extern struct vg_shader _shader_scene_terrain;
4 extern GLuint _uniform_scene_terrain_uMdl;
5 extern GLuint _uniform_scene_terrain_uPv;
6 extern GLuint _uniform_scene_terrain_uPvmPrev;
7 extern GLuint _uniform_scene_terrain_uTexGarbage;
8 extern GLuint _uniform_scene_terrain_uTexGradients;
9 extern GLuint _uniform_scene_terrain_uCamera;
10 extern GLuint _uniform_scene_terrain_uSandColour;
11 extern GLuint _uniform_scene_terrain_uBlendOffset;
12 extern GLuint _uniform_scene_terrain_g_world_depth;
13 extern GLuint _uniform_scene_terrain_uLightsArray;
14 extern GLuint _uniform_scene_terrain_uLightsIndex;
15 static inline void shader_scene_terrain_uMdl(m4x3f m)
16 {
17 glUniformMatrix4x3fv(_uniform_scene_terrain_uMdl,1,GL_FALSE,(f32*)m);
18 }
19 static inline void shader_scene_terrain_uPv(m4x4f m)
20 {
21 glUniformMatrix4fv(_uniform_scene_terrain_uPv,1,GL_FALSE,(f32*)m);
22 }
23 static inline void shader_scene_terrain_uPvmPrev(m4x4f m)
24 {
25 glUniformMatrix4fv(_uniform_scene_terrain_uPvmPrev,1,GL_FALSE,(f32*)m);
26 }
27 static inline void shader_scene_terrain_uTexGarbage(int i)
28 {
29 glUniform1i(_uniform_scene_terrain_uTexGarbage,i);
30 }
31 static inline void shader_scene_terrain_uTexGradients(int i)
32 {
33 glUniform1i(_uniform_scene_terrain_uTexGradients,i);
34 }
35 static inline void shader_scene_terrain_uCamera(v3f v)
36 {
37 glUniform3fv(_uniform_scene_terrain_uCamera,1,v);
38 }
39 static inline void shader_scene_terrain_uSandColour(v3f v)
40 {
41 glUniform3fv(_uniform_scene_terrain_uSandColour,1,v);
42 }
43 static inline void shader_scene_terrain_uBlendOffset(v2f v)
44 {
45 glUniform2fv(_uniform_scene_terrain_uBlendOffset,1,v);
46 }
47 static inline void shader_scene_terrain_g_world_depth(int i)
48 {
49 glUniform1i(_uniform_scene_terrain_g_world_depth,i);
50 }
51 static inline void shader_scene_terrain_use(void);
52 static inline void shader_scene_terrain_use(void)
53 {
54 glUseProgram(_shader_scene_terrain.id);
55 }