revision 2
[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_uDepthCompare;
16 static inline void shader_model_board_view_uMdl(m4x3f m)
17 {
18 glUniformMatrix4x3fv(_uniform_model_board_view_uMdl,1,GL_FALSE,(f32*)m);
19 }
20 static inline void shader_model_board_view_uPv(m4x4f m)
21 {
22 glUniformMatrix4fv(_uniform_model_board_view_uPv,1,GL_FALSE,(f32*)m);
23 }
24 static inline void shader_model_board_view_uPvmPrev(m4x4f m)
25 {
26 glUniformMatrix4fv(_uniform_model_board_view_uPvmPrev,1,GL_FALSE,(f32*)m);
27 }
28 static inline void shader_model_board_view_uTexMain(int i)
29 {
30 glUniform1i(_uniform_model_board_view_uTexMain,i);
31 }
32 static inline void shader_model_board_view_uCamera(v3f v)
33 {
34 glUniform3fv(_uniform_model_board_view_uCamera,1,v);
35 }
36 static inline void shader_model_board_view_g_world_depth(int i)
37 {
38 glUniform1i(_uniform_model_board_view_g_world_depth,i);
39 }
40 static inline void shader_model_board_view_uTexSceneDepth(int i)
41 {
42 glUniform1i(_uniform_model_board_view_uTexSceneDepth,i);
43 }
44 static inline void shader_model_board_view_uInverseRatioDepth(v3f v)
45 {
46 glUniform3fv(_uniform_model_board_view_uInverseRatioDepth,1,v);
47 }
48 static inline void shader_model_board_view_uInverseRatioMain(v3f v)
49 {
50 glUniform3fv(_uniform_model_board_view_uInverseRatioMain,1,v);
51 }
52 static inline void shader_model_board_view_uDepthCompare(int b)
53 {
54 glUniform1i(_uniform_model_board_view_uDepthCompare,b);
55 }
56 static inline void shader_model_board_view_use(void);
57 static inline void shader_model_board_view_use(void)
58 {
59 glUseProgram(_shader_model_board_view.id);
60 }