diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-08-15 05:59:28 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-09-02 01:08:42 +0200 |
commit | 653ace96c6974cd17ec27252dfdb17d8de40d4d9 (patch) | |
tree | 6b93e4ba282fdcdfdaae981096b67e871ac83bee /chart2/opengl | |
parent | 4dbd58abb495f3e3dd008489f84f8380207127f3 (diff) |
make sure that all shaders contain a version string
This is necessary for OSX where we are using a core context that does
not implement any legacy features anymore.
Change-Id: I59536e99761691d910fef62cf82ceb03e57725ae
Diffstat (limited to 'chart2/opengl')
26 files changed, 48 insertions, 2 deletions
diff --git a/chart2/opengl/backgroundFragmentShader.glsl b/chart2/opengl/backgroundFragmentShader.glsl index 805789e731ed..424ae31a6882 100644 --- a/chart2/opengl/backgroundFragmentShader.glsl +++ b/chart2/opengl/backgroundFragmentShader.glsl @@ -7,6 +7,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#version 130 + varying vec4 fragmentColor; void main() diff --git a/chart2/opengl/backgroundVertexShader.glsl b/chart2/opengl/backgroundVertexShader.glsl index 6d9d6c21f3c9..239675cdfa09 100644 --- a/chart2/opengl/backgroundVertexShader.glsl +++ b/chart2/opengl/backgroundVertexShader.glsl @@ -7,6 +7,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#version 130 + attribute vec3 vPosition; uniform mat4 MVP; attribute vec4 vColor; diff --git a/chart2/opengl/commonFragmentShader.glsl b/chart2/opengl/commonFragmentShader.glsl index 805789e731ed..424ae31a6882 100644 --- a/chart2/opengl/commonFragmentShader.glsl +++ b/chart2/opengl/commonFragmentShader.glsl @@ -7,6 +7,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#version 130 + varying vec4 fragmentColor; void main() diff --git a/chart2/opengl/commonVertexShader.glsl b/chart2/opengl/commonVertexShader.glsl index f32e3fd38a91..efbb8f1f9c27 100644 --- a/chart2/opengl/commonVertexShader.glsl +++ b/chart2/opengl/commonVertexShader.glsl @@ -7,6 +7,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#version 130 + attribute vec3 vPosition; uniform mat4 MVP; uniform vec4 vColor; diff --git a/chart2/opengl/debugFragmentShader.glsl b/chart2/opengl/debugFragmentShader.glsl index d36c4f4d46e4..3366b1507989 100644 --- a/chart2/opengl/debugFragmentShader.glsl +++ b/chart2/opengl/debugFragmentShader.glsl @@ -7,6 +7,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#version 130 + varying vec4 fragmentColor; void main() diff --git a/chart2/opengl/debugVertexShader.glsl b/chart2/opengl/debugVertexShader.glsl index 762de3121419..622727f3c858 100644 --- a/chart2/opengl/debugVertexShader.glsl +++ b/chart2/opengl/debugVertexShader.glsl @@ -7,6 +7,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#version 130 + attribute vec3 vPosition; uniform vec4 vColor; varying vec4 fragmentColor; diff --git a/chart2/opengl/pickingFragmentShader.glsl b/chart2/opengl/pickingFragmentShader.glsl index e2fba0391442..9d3b7bb71550 100644 --- a/chart2/opengl/pickingFragmentShader.glsl +++ b/chart2/opengl/pickingFragmentShader.glsl @@ -6,6 +6,9 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#version 130 + uniform float minCoordX; varying vec3 positionWorldspace; varying vec4 fragmentColor; diff --git a/chart2/opengl/pickingVertexShader.glsl b/chart2/opengl/pickingVertexShader.glsl index df71ae170f01..d751a755dde9 100644 --- a/chart2/opengl/pickingVertexShader.glsl +++ b/chart2/opengl/pickingVertexShader.glsl @@ -7,6 +7,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#version 130 + attribute vec3 vPosition; uniform mat4 MVP; uniform mat4 M; diff --git a/chart2/opengl/renderTextureFragmentShader.glsl b/chart2/opengl/renderTextureFragmentShader.glsl index a6c71f4e4d96..8029d08edf09 100644 --- a/chart2/opengl/renderTextureFragmentShader.glsl +++ b/chart2/opengl/renderTextureFragmentShader.glsl @@ -7,6 +7,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#version 130 + uniform sampler2D RenderTex; varying vec2 vTexCoord; diff --git a/chart2/opengl/renderTextureVertexShader.glsl b/chart2/opengl/renderTextureVertexShader.glsl index dd11b155b0fa..43ab1b06d220 100644 --- a/chart2/opengl/renderTextureVertexShader.glsl +++ b/chart2/opengl/renderTextureVertexShader.glsl @@ -7,6 +7,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#version 130 + attribute vec4 vPosition; attribute vec2 texCoord; varying vec2 vTexCoord; diff --git a/chart2/opengl/screenTextFragmentShader.glsl b/chart2/opengl/screenTextFragmentShader.glsl index 1354bf17a129..e1fb0784641b 100644 --- a/chart2/opengl/screenTextFragmentShader.glsl +++ b/chart2/opengl/screenTextFragmentShader.glsl @@ -7,6 +7,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#version 130 + varying vec2 vTexCoord; uniform sampler2D TextTex; uniform vec4 textColor; diff --git a/chart2/opengl/screenTextVertexShader.glsl b/chart2/opengl/screenTextVertexShader.glsl index 8d046f56394c..5428875314c7 100644 --- a/chart2/opengl/screenTextVertexShader.glsl +++ b/chart2/opengl/screenTextVertexShader.glsl @@ -7,6 +7,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#version 130 + attribute vec3 vPosition; attribute vec2 texCoord; varying vec2 vTexCoord; diff --git a/chart2/opengl/shape3DFragmentShader.glsl b/chart2/opengl/shape3DFragmentShader.glsl index 5cb521afccab..5c1614ce3252 100644 --- a/chart2/opengl/shape3DFragmentShader.glsl +++ b/chart2/opengl/shape3DFragmentShader.glsl @@ -6,6 +6,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + #version 330 core #define MAX_LIGHT_NUM 8 diff --git a/chart2/opengl/shape3DFragmentShaderBatch.glsl b/chart2/opengl/shape3DFragmentShaderBatch.glsl index be24dbf08432..e2a096155bc2 100644 --- a/chart2/opengl/shape3DFragmentShaderBatch.glsl +++ b/chart2/opengl/shape3DFragmentShaderBatch.glsl @@ -6,6 +6,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + #version 330 core #define MAX_LIGHT_NUM 8 diff --git a/chart2/opengl/shape3DFragmentShaderBatchScroll.glsl b/chart2/opengl/shape3DFragmentShaderBatchScroll.glsl index 33e970fb918c..a4686a31e26a 100644 --- a/chart2/opengl/shape3DFragmentShaderBatchScroll.glsl +++ b/chart2/opengl/shape3DFragmentShaderBatchScroll.glsl @@ -6,6 +6,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + #version 330 core #define MAX_LIGHT_NUM 8 diff --git a/chart2/opengl/shape3DFragmentShaderV300.glsl b/chart2/opengl/shape3DFragmentShaderV300.glsl index 05e27701c807..c6888dbf0ba1 100644 --- a/chart2/opengl/shape3DFragmentShaderV300.glsl +++ b/chart2/opengl/shape3DFragmentShaderV300.glsl @@ -6,6 +6,9 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#version 130 + #define MAX_LIGHT_NUM 8 varying vec3 positionWorldspace; diff --git a/chart2/opengl/shape3DVertexShader.glsl b/chart2/opengl/shape3DVertexShader.glsl index 7f8a6f06e858..9b763c968e15 100644 --- a/chart2/opengl/shape3DVertexShader.glsl +++ b/chart2/opengl/shape3DVertexShader.glsl @@ -6,7 +6,9 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + #version 330 core + in vec3 vertexPositionModelspace; in vec3 vertexNormalModelspace; diff --git a/chart2/opengl/shape3DVertexShaderBatch.glsl b/chart2/opengl/shape3DVertexShaderBatch.glsl index e0a1d304cf73..46a91a23a86b 100644 --- a/chart2/opengl/shape3DVertexShaderBatch.glsl +++ b/chart2/opengl/shape3DVertexShaderBatch.glsl @@ -6,7 +6,9 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + #version 330 core + in vec3 vertexPositionModelspace; in vec3 vertexNormalModelspace; in mat4 M; diff --git a/chart2/opengl/shape3DVertexShaderBatchScroll.glsl b/chart2/opengl/shape3DVertexShaderBatchScroll.glsl index 87946f7d076b..2caff6e8d4d3 100644 --- a/chart2/opengl/shape3DVertexShaderBatchScroll.glsl +++ b/chart2/opengl/shape3DVertexShaderBatchScroll.glsl @@ -6,7 +6,9 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + #version 330 core + in vec3 vertexPositionModelspace; in vec3 vertexNormalModelspace; in mat4 M; diff --git a/chart2/opengl/shape3DVertexShaderV300.glsl b/chart2/opengl/shape3DVertexShaderV300.glsl index a8da294fb3cd..b28d9cce3203 100644 --- a/chart2/opengl/shape3DVertexShaderV300.glsl +++ b/chart2/opengl/shape3DVertexShaderV300.glsl @@ -6,6 +6,9 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#version 130 + attribute vec3 vertexPositionModelspace; attribute vec3 vertexNormalModelspace; diff --git a/chart2/opengl/symbolFragmentShader.glsl b/chart2/opengl/symbolFragmentShader.glsl index 3ac6b0305285..bb3e4dab7831 100644 --- a/chart2/opengl/symbolFragmentShader.glsl +++ b/chart2/opengl/symbolFragmentShader.glsl @@ -7,7 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#version 120 +#version 130 varying vec4 fragmentColor; uniform int shape; diff --git a/chart2/opengl/symbolVertexShader.glsl b/chart2/opengl/symbolVertexShader.glsl index 3cf9f41ef21b..0c6617efbd60 100644 --- a/chart2/opengl/symbolVertexShader.glsl +++ b/chart2/opengl/symbolVertexShader.glsl @@ -7,7 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#version 120 +#version 130 attribute vec3 vPosition; uniform mat4 MVP; diff --git a/chart2/opengl/textFragmentShader.glsl b/chart2/opengl/textFragmentShader.glsl index c1d44bc56f63..80ae00ac6f02 100644 --- a/chart2/opengl/textFragmentShader.glsl +++ b/chart2/opengl/textFragmentShader.glsl @@ -7,6 +7,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#version 130 + uniform sampler2D TextTex; varying vec2 vTexCoord; void main() diff --git a/chart2/opengl/textFragmentShaderBatch.glsl b/chart2/opengl/textFragmentShaderBatch.glsl index 700888387008..431fa4ca73e8 100644 --- a/chart2/opengl/textFragmentShaderBatch.glsl +++ b/chart2/opengl/textFragmentShaderBatch.glsl @@ -8,6 +8,7 @@ */ #version 330 core + #extension GL_EXT_texture_array : enable uniform sampler2DArray texArray; diff --git a/chart2/opengl/textVertexShader.glsl b/chart2/opengl/textVertexShader.glsl index a805229eb07a..c76223b31e22 100644 --- a/chart2/opengl/textVertexShader.glsl +++ b/chart2/opengl/textVertexShader.glsl @@ -7,6 +7,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#version 130 + attribute vec3 vPosition; uniform mat4 MVP; attribute vec2 texCoord; diff --git a/chart2/opengl/textVertexShaderBatch.glsl b/chart2/opengl/textVertexShaderBatch.glsl index e61beb632ff1..d5ae4967d345 100644 --- a/chart2/opengl/textVertexShaderBatch.glsl +++ b/chart2/opengl/textVertexShaderBatch.glsl @@ -8,6 +8,7 @@ */ #version 330 core + in vec3 vPosition; in vec3 texCoord; |