mirror of
https://github.com/glfw/glfw.git
synced 2025-10-05 06:06:36 +00:00
Add version directives to GLSL shaders
Although not technically required, I believe it is best practice for shaders to specify which version of the GLSL spec they conform to. To quote the spec: > Shaders should declare the version of the language they are written to. NB: I have presumed the version is 1.10, but it should be corrected if a later version was intended.
This commit is contained in:
parent
fc86d741db
commit
ce4b479219
@ -47,6 +47,7 @@
|
|||||||
#define CURSOR_FRAME_COUNT 60
|
#define CURSOR_FRAME_COUNT 60
|
||||||
|
|
||||||
static const char* vertex_shader_text =
|
static const char* vertex_shader_text =
|
||||||
|
"#version 110\n"
|
||||||
"uniform mat4 MVP;\n"
|
"uniform mat4 MVP;\n"
|
||||||
"attribute vec2 vPos;\n"
|
"attribute vec2 vPos;\n"
|
||||||
"void main()\n"
|
"void main()\n"
|
||||||
@ -55,6 +56,7 @@ static const char* vertex_shader_text =
|
|||||||
"}\n";
|
"}\n";
|
||||||
|
|
||||||
static const char* fragment_shader_text =
|
static const char* fragment_shader_text =
|
||||||
|
"#version 110\n"
|
||||||
"void main()\n"
|
"void main()\n"
|
||||||
"{\n"
|
"{\n"
|
||||||
" gl_FragColor = vec4(1.0);\n"
|
" gl_FragColor = vec4(1.0);\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user