change shader properties to be vg_msg based
[carveJwlIkooP6JGAAIwe30JlM.git] / shaders / model_board_view.h
1 #pragma once
2 #include "vg/vg_engine.h"
3 extern struct vg_shader _shader_model_board_view;
4 extern GLuint _uniform_model_board_view_uMdl;
5 extern GLuint _uniform_model_board_view_uPv;
6 extern GLuint _uniform_model_board_view_uPvmPrev;
7 extern GLuint _uniform_model_board_view_uTexMain;
8 extern GLuint _uniform_model_board_view_uCamera;
9 extern GLuint _uniform_model_board_view_g_world_depth;
10 extern GLuint _uniform_model_board_view_uLightsArray;
11 extern GLuint _uniform_model_board_view_uLightsIndex;
12 extern GLuint _uniform_model_board_view_uTexSceneDepth;
13 extern GLuint _uniform_model_board_view_uInverseRatioDepth;
14 extern GLuint _uniform_model_board_view_uInverseRatioMain;
15 extern GLuint _uniform_model_board_view_uDepthMode;
16 extern GLuint _uniform_model_board_view_uDitherCutoff;
17 static inline void shader_model_board_view_uMdl(m4x3f m)
18 {
19 glUniformMatrix4x3fv(_uniform_model_board_view_uMdl,1,GL_FALSE,(f32*)m);
20 }
21 static inline void shader_model_board_view_uPv(m4x4f m)
22 {
23 glUniformMatrix4fv(_uniform_model_board_view_uPv,1,GL_FALSE,(f32*)m);
24 }
25 static inline void shader_model_board_view_uPvmPrev(m4x4f m)
26 {
27 glUniformMatrix4fv(_uniform_model_board_view_uPvmPrev,1,GL_FALSE,(f32*)m);
28 }
29 static inline void shader_model_board_view_uTexMain(int i)
30 {
31 glUniform1i(_uniform_model_board_view_uTexMain,i);
32 }
33 static inline void shader_model_board_view_uCamera(v3f v)
34 {
35 glUniform3fv(_uniform_model_board_view_uCamera,1,v);
36 }
37 static inline void shader_model_board_view_g_world_depth(int i)
38 {
39 glUniform1i(_uniform_model_board_view_g_world_depth,i);
40 }
41 static inline void shader_model_board_view_uTexSceneDepth(int i)
42 {
43 glUniform1i(_uniform_model_board_view_uTexSceneDepth,i);
44 }
45 static inline void shader_model_board_view_uInverseRatioDepth(v3f v)
46 {
47 glUniform3fv(_uniform_model_board_view_uInverseRatioDepth,1,v);
48 }
49 static inline void shader_model_board_view_uInverseRatioMain(v3f v)
50 {
51 glUniform3fv(_uniform_model_board_view_uInverseRatioMain,1,v);
52 }
53 static inline void shader_model_board_view_uDepthMode(int b)
54 {
55 glUniform1i(_uniform_model_board_view_uDepthMode,b);
56 }
57 static inline void shader_model_board_view_uDitherCutoff(f32 f)
58 {
59 glUniform1f(_uniform_model_board_view_uDitherCutoff,f);
60 }
61 static inline void shader_model_board_view_use(void);
62 static inline void shader_model_board_view_use(void)
63 {
64 glUseProgram(_shader_model_board_view.id);
65 }