-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConstShaders.h
More file actions
45 lines (36 loc) · 953 Bytes
/
Copy pathConstShaders.h
File metadata and controls
45 lines (36 loc) · 953 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
39
40
41
42
43
44
45
#ifndef _MY_CONSTSHADERS_1_HPP_
#define _MY_CONSTSHADERS_1_HPP_
// ============================================================================
// ==================================================================
// #version 330 core
// layout(location = 0) in vec3 position;
// void main()
// {
// gl_Position = vec4(position.x, position.y, position.z, 1.0);
// }
const GLchar * const vertexShaderSource =
"\
#version 330 core\n \
layout(location = 0) in vec3 position; \
void main() \
{ \
gl_Position = vec4(position.x, position.y, position.z, 1.0); \
} \
";
// ==================================================================
// #version 330 core
// out vec4 color;
// void main()
// {
// color = vec4(1.0f, 0.5f, 0.2f, 1.0f);
// }
const GLchar * const fragmentShaderSource =
"\
#version 330 core\n \
out vec4 color; \
void main() \
{ \
color = vec4(1.0f, 0.5f, 0.2f, 1.0f); \
} \
";
#endif