forked from WenlinMao/SleepWalking
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathObjectColorTextureProgram.hpp
More file actions
38 lines (30 loc) · 970 Bytes
/
Copy pathObjectColorTextureProgram.hpp
File metadata and controls
38 lines (30 loc) · 970 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#pragma once
#include "GL.hpp"
#include "Load.hpp"
#include "Scene.hpp"
//Shader program that draws transformed, lit, textured vertices tinted with vertex colors:
struct ObjectColorTextureProgram {
ObjectColorTextureProgram();
~ObjectColorTextureProgram();
GLuint program = 0;
//Attribute (per-vertex variable) locations:
GLuint Position_vec4 = -1U;
GLuint Normal_vec3 = -1U;
GLuint Color_vec4 = -1U;
GLuint Model_mat4 = -1U;
GLuint TexCoord_vec2 = -1U;
//Uniform (per-invocation variable) locations:
GLuint OBJECT_TO_CLIP_mat4 = -1U;
GLuint OBJECT_TO_LIGHT_mat4x3 = -1U;
GLuint NORMAL_TO_LIGHT_mat3 = -1U;
//lighting:
GLuint LIGHT_TYPE_int = -1U;
GLuint LIGHT_LOCATION_vec3 = -1U;
GLuint LIGHT_DIRECTION_vec3 = -1U;
GLuint LIGHT_ENERGY_vec3 = -1U;
GLuint LIGHT_CUTOFF_float = -1U;
//Textures:
//TEXTURE0 - texture that is accessed by TexCoord
GLint Texture_Id = 0;
};
extern Load< ObjectColorTextureProgram > object_color_texture_program;