revision 2
[carveJwlIkooP6JGAAIwe30JlM.git] / shaders / scene_standard.h
1 #pragma once
2 #include "vg/vg_engine.h"
3 extern struct vg_shader _shader_scene_standard;
4 extern GLuint _uniform_scene_standard_uMdl;
5 extern GLuint _uniform_scene_standard_uPv;
6 extern GLuint _uniform_scene_standard_uPvmPrev;
7 extern GLuint _uniform_scene_standard_uTexGarbage;
8 extern GLuint _uniform_scene_standard_uTexMain;
9 extern GLuint _uniform_scene_standard_uCamera;
10 extern GLuint _uniform_scene_standard_uPlane;
11 extern GLuint _uniform_scene_standard_g_world_depth;
12 extern GLuint _uniform_scene_standard_uLightsArray;
13 extern GLuint _uniform_scene_standard_uLightsIndex;
14 static inline void shader_scene_standard_uMdl(m4x3f m)
15 {
16 glUniformMatrix4x3fv(_uniform_scene_standard_uMdl,1,GL_FALSE,(f32*)m);
17 }
18 static inline void shader_scene_standard_uPv(m4x4f m)
19 {
20 glUniformMatrix4fv(_uniform_scene_standard_uPv,1,GL_FALSE,(f32*)m);
21 }
22 static inline void shader_scene_standard_uPvmPrev(m4x4f m)
23 {
24 glUniformMatrix4fv(_uniform_scene_standard_uPvmPrev,1,GL_FALSE,(f32*)m);
25 }
26 static inline void shader_scene_standard_uTexGarbage(int i)
27 {
28 glUniform1i(_uniform_scene_standard_uTexGarbage,i);
29 }
30 static inline void shader_scene_standard_uTexMain(int i)
31 {
32 glUniform1i(_uniform_scene_standard_uTexMain,i);
33 }
34 static inline void shader_scene_standard_uCamera(v3f v)
35 {
36 glUniform3fv(_uniform_scene_standard_uCamera,1,v);
37 }
38 static inline void shader_scene_standard_uPlane(v4f v)
39 {
40 glUniform4fv(_uniform_scene_standard_uPlane,1,v);
41 }
42 static inline void shader_scene_standard_g_world_depth(int i)
43 {
44 glUniform1i(_uniform_scene_standard_g_world_depth,i);
45 }
46 static inline void shader_scene_standard_use(void);
47 static inline void shader_scene_standard_use(void)
48 {
49 glUseProgram(_shader_scene_standard.id);
50 }