diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-08-15 06:37:37 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-09-02 01:08:43 +0200 |
commit | 8d61b3feee74263aff32e471f8d4230a74353ad5 (patch) | |
tree | 4359b8fcecd6697a340390da7f5ecb9f8d95762d /chart2/opengl | |
parent | 249c5e0f211bbdcbffda91a446dedd33c314ee64 (diff) |
texture*D in GLSL is deprecated and not available in core contexts
Change-Id: Ia5da0899d73aea22fe7bae735e57e30dcd37b254
Diffstat (limited to 'chart2/opengl')
-rw-r--r-- | chart2/opengl/commonFragmentShader.glsl | 3 | ||||
-rw-r--r-- | chart2/opengl/screenTextFragmentShader.glsl | 6 | ||||
-rw-r--r-- | chart2/opengl/textFragmentShader.glsl | 7 | ||||
-rw-r--r-- | chart2/opengl/textFragmentShaderBatch.glsl | 2 |
4 files changed, 12 insertions, 6 deletions
diff --git a/chart2/opengl/commonFragmentShader.glsl b/chart2/opengl/commonFragmentShader.glsl index d602b21a3488..bb2482b4a57b 100644 --- a/chart2/opengl/commonFragmentShader.glsl +++ b/chart2/opengl/commonFragmentShader.glsl @@ -10,10 +10,11 @@ #version 150 core in vec4 fragmentColor; +out vec4 actualColor; void main() { - gl_FragColor = fragmentColor; + actualColor = fragmentColor; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/opengl/screenTextFragmentShader.glsl b/chart2/opengl/screenTextFragmentShader.glsl index 7c90ec0e3eb0..f76abee1630e 100644 --- a/chart2/opengl/screenTextFragmentShader.glsl +++ b/chart2/opengl/screenTextFragmentShader.glsl @@ -12,10 +12,12 @@ in vec2 vTexCoord; uniform sampler2D TextTex; uniform vec4 textColor; +out vec4 actualColor; + void main() { - vec3 color = texture2D(TextTex, vTexCoord).rgb; - gl_FragColor = vec4(textColor.rgb, 1.0 - color.r); + vec3 color = texture(TextTex, vTexCoord).rgb; + actualColor = vec4(textColor.rgb, 1.0 - color.r); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/opengl/textFragmentShader.glsl b/chart2/opengl/textFragmentShader.glsl index 1c3af260c9a4..16be8c6ae0f0 100644 --- a/chart2/opengl/textFragmentShader.glsl +++ b/chart2/opengl/textFragmentShader.glsl @@ -11,10 +11,13 @@ uniform sampler2D TextTex; in vec2 vTexCoord; +out vec4 actualColor; + + void main() { - vec3 color = texture2D(TextTex, vTexCoord).rgb; - gl_FragColor = vec4(color, 1.0 - color.r); + vec3 color = texture(TextTex, vTexCoord).rgb; + actualColor = vec4(color, 1.0 - color.r); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/opengl/textFragmentShaderBatch.glsl b/chart2/opengl/textFragmentShaderBatch.glsl index 431fa4ca73e8..c97812bd0879 100644 --- a/chart2/opengl/textFragmentShaderBatch.glsl +++ b/chart2/opengl/textFragmentShaderBatch.glsl @@ -17,7 +17,7 @@ in vec3 vTexCoord; out vec4 actualColor; void main() { - vec3 color = texture2DArray(texArray, vTexCoord.xyz).rgb; + vec3 color = texture(texArray, vTexCoord.xyz).rgb; actualColor = vec4(color, 1.0 - color.r); } |