OpenGL: prepare GLSL for version 3.3

- use in/out instead of attribute/varying
- use named output instead of gl_FragColor
- use texture() instead of the multitude of older texture sampling functions

The #if __VERSION__ == 120 paths (needed on Mac) will be removed after we switch to 3.3 core profile.

Part of T49165 (general OpenGL upgrade)
This commit is contained in:
2017-03-27 01:16:18 -04:00
parent 159f56f4ab
commit b95ee78ed3
9 changed files with 63 additions and 14 deletions

View File

@@ -1,7 +1,11 @@
varying vec3 varposition;
varying vec3 varnormal;
#if __VERSION__ == 120
varying vec3 varposition;
varying vec3 varnormal;
#else
out vec3 varposition;
out vec3 varnormal;
#endif
/* Color, keep in sync with: gpu_shader_vertex.glsl */