change shader properties to be vg_msg based
[carveJwlIkooP6JGAAIwe30JlM.git] / shaders / scene_override.h
1 #pragma once
2 #include "vg/vg_engine.h"
3 extern struct vg_shader _shader_scene_override;
4 extern GLuint _uniform_scene_override_uMdl;
5 extern GLuint _uniform_scene_override_uPv;
6 extern GLuint _uniform_scene_override_uPvmPrev;
7 extern GLuint _uniform_scene_override_uNormalMtx;
8 extern GLuint _uniform_scene_override_uTexGarbage;
9 extern GLuint _uniform_scene_override_uTexMain;
10 extern GLuint _uniform_scene_override_uCamera;
11 extern GLuint _uniform_scene_override_uPlane;
12 extern GLuint _uniform_scene_override_uPlayerPos;
13 extern GLuint _uniform_scene_override_uSpawnPos;
14 extern GLuint _uniform_scene_override_uAlphatest;
15 extern GLuint _uniform_scene_override_uMapInfo;
16 extern GLuint _uniform_scene_override_g_world_depth;
17 extern GLuint _uniform_scene_override_uLightsArray;
18 extern GLuint _uniform_scene_override_uLightsIndex;
19 static inline void shader_scene_override_uMdl(m4x3f m)
20 {
21 glUniformMatrix4x3fv(_uniform_scene_override_uMdl,1,GL_FALSE,(f32*)m);
22 }
23 static inline void shader_scene_override_uPv(m4x4f m)
24 {
25 glUniformMatrix4fv(_uniform_scene_override_uPv,1,GL_FALSE,(f32*)m);
26 }
27 static inline void shader_scene_override_uPvmPrev(m4x4f m)
28 {
29 glUniformMatrix4fv(_uniform_scene_override_uPvmPrev,1,GL_FALSE,(f32*)m);
30 }
31 static inline void shader_scene_override_uNormalMtx(m3x3f m)
32 {
33 glUniformMatrix3fv(_uniform_scene_override_uNormalMtx,1,GL_FALSE,(f32*)m);
34 }
35 static inline void shader_scene_override_uTexGarbage(int i)
36 {
37 glUniform1i(_uniform_scene_override_uTexGarbage,i);
38 }
39 static inline void shader_scene_override_uTexMain(int i)
40 {
41 glUniform1i(_uniform_scene_override_uTexMain,i);
42 }
43 static inline void shader_scene_override_uCamera(v3f v)
44 {
45 glUniform3fv(_uniform_scene_override_uCamera,1,v);
46 }
47 static inline void shader_scene_override_uPlane(v4f v)
48 {
49 glUniform4fv(_uniform_scene_override_uPlane,1,v);
50 }
51 static inline void shader_scene_override_uPlayerPos(v4f v)
52 {
53 glUniform4fv(_uniform_scene_override_uPlayerPos,1,v);
54 }
55 static inline void shader_scene_override_uSpawnPos(v4f v)
56 {
57 glUniform4fv(_uniform_scene_override_uSpawnPos,1,v);
58 }
59 static inline void shader_scene_override_uAlphatest(int b)
60 {
61 glUniform1i(_uniform_scene_override_uAlphatest,b);
62 }
63 static inline void shader_scene_override_uMapInfo(v4f v)
64 {
65 glUniform4fv(_uniform_scene_override_uMapInfo,1,v);
66 }
67 static inline void shader_scene_override_g_world_depth(int i)
68 {
69 glUniform1i(_uniform_scene_override_g_world_depth,i);
70 }
71 static inline void shader_scene_override_use(void);
72 static inline void shader_scene_override_use(void)
73 {
74 glUseProgram(_shader_scene_override.id);
75 }