diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2016-07-27 18:57:28 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2016-08-05 08:02:28 +0000 |
commit | f3d26af51588af441f62fb69bb7a5432845226ac (patch) | |
tree | 9edf937c4452605f0252e5ccfd55c38c34d865a9 | |
parent | 8433d136bcad3e5618ae63d0add0014ef2ff7fd9 (diff) |
opengl: add #version to shaders - minimum 130 which is OpenGL 3.0
Change-Id: I5710ce91e804641d4c997bc3d06970a5ed0cb5b1
Reviewed-on: https://gerrit.libreoffice.org/27890
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
21 files changed, 42 insertions, 0 deletions
diff --git a/vcl/opengl/areaScaleFastFragmentShader.glsl b/vcl/opengl/areaScaleFastFragmentShader.glsl index f74397bcf4a1..57ad8fa97853 100644 --- a/vcl/opengl/areaScaleFastFragmentShader.glsl +++ b/vcl/opengl/areaScaleFastFragmentShader.glsl @@ -9,6 +9,8 @@ /* TODO Use textureOffset for newest version of GLSL */ +#version 130 + uniform sampler2D sampler; uniform int xscale; uniform int yscale; diff --git a/vcl/opengl/blendedTextureFragmentShader.glsl b/vcl/opengl/blendedTextureFragmentShader.glsl index eabb6524b6af..15dfcf7e77f5 100644 --- a/vcl/opengl/blendedTextureFragmentShader.glsl +++ b/vcl/opengl/blendedTextureFragmentShader.glsl @@ -7,6 +7,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#version 130 + varying vec2 tex_coord; varying vec2 alpha_coord; varying vec2 mask_coord; diff --git a/vcl/opengl/blendedTextureVertexShader.glsl b/vcl/opengl/blendedTextureVertexShader.glsl index 64bae785aa78..3e60d0e223ac 100644 --- a/vcl/opengl/blendedTextureVertexShader.glsl +++ b/vcl/opengl/blendedTextureVertexShader.glsl @@ -7,6 +7,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#version 130 + attribute vec4 position; attribute vec2 tex_coord_in; attribute vec2 alpha_coord_in; diff --git a/vcl/opengl/combinedFragmentShader.glsl b/vcl/opengl/combinedFragmentShader.glsl index ba4fe2eef665..2515b174f7c1 100644 --- a/vcl/opengl/combinedFragmentShader.glsl +++ b/vcl/opengl/combinedFragmentShader.glsl @@ -7,6 +7,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#version 130 + varying float fade_factor; // 0->1 fade factor used for AA varying float multiply; diff --git a/vcl/opengl/combinedTextureFragmentShader.glsl b/vcl/opengl/combinedTextureFragmentShader.glsl index 67797be2c096..2990de8c4d99 100644 --- a/vcl/opengl/combinedTextureFragmentShader.glsl +++ b/vcl/opengl/combinedTextureFragmentShader.glsl @@ -7,6 +7,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#version 130 + varying vec2 tex_coord; varying vec2 alpha_coord; varying vec2 mask_coord; diff --git a/vcl/opengl/combinedTextureVertexShader.glsl b/vcl/opengl/combinedTextureVertexShader.glsl index a3e4642023ab..52d44d5538cb 100644 --- a/vcl/opengl/combinedTextureVertexShader.glsl +++ b/vcl/opengl/combinedTextureVertexShader.glsl @@ -7,6 +7,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#version 130 + attribute vec4 position; attribute vec2 tex_coord_in; attribute vec2 mask_coord_in; diff --git a/vcl/opengl/combinedVertexShader.glsl b/vcl/opengl/combinedVertexShader.glsl index 3337a085db6f..518221fb5bd1 100644 --- a/vcl/opengl/combinedVertexShader.glsl +++ b/vcl/opengl/combinedVertexShader.glsl @@ -7,6 +7,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#version 130 + attribute vec2 position; attribute vec4 extrusion_vectors; #ifdef USE_VERTEX_COLORS diff --git a/vcl/opengl/convolutionFragmentShader.glsl b/vcl/opengl/convolutionFragmentShader.glsl index d4f78027faa3..4b2f316e0bba 100644 --- a/vcl/opengl/convolutionFragmentShader.glsl +++ b/vcl/opengl/convolutionFragmentShader.glsl @@ -9,6 +9,8 @@ /* TODO Use textureOffset for newest version of GLSL */ +#version 130 + uniform sampler2D sampler; uniform vec2 offsets[16]; uniform float kernel[16]; diff --git a/vcl/opengl/diffTextureFragmentShader.glsl b/vcl/opengl/diffTextureFragmentShader.glsl index af9a1dce3415..8c50ddf98bd9 100644 --- a/vcl/opengl/diffTextureFragmentShader.glsl +++ b/vcl/opengl/diffTextureFragmentShader.glsl @@ -7,6 +7,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#version 130 + /*precision mediump float;*/ varying vec2 tex_coord; varying vec2 mask_coord; diff --git a/vcl/opengl/dumbVertexShader.glsl b/vcl/opengl/dumbVertexShader.glsl index deaa35bc1114..80341b614e3b 100644 --- a/vcl/opengl/dumbVertexShader.glsl +++ b/vcl/opengl/dumbVertexShader.glsl @@ -7,6 +7,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#version 130 + attribute vec4 position; uniform mat4 mvp; diff --git a/vcl/opengl/greyscaleFragmentShader.glsl b/vcl/opengl/greyscaleFragmentShader.glsl index 758109e98678..c37f0d5df9c7 100644 --- a/vcl/opengl/greyscaleFragmentShader.glsl +++ b/vcl/opengl/greyscaleFragmentShader.glsl @@ -7,6 +7,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#version 130 + varying vec2 tex_coord; uniform sampler2D sampler; diff --git a/vcl/opengl/invert50FragmentShader.glsl b/vcl/opengl/invert50FragmentShader.glsl index 8fac1cc3983b..9222888f0449 100644 --- a/vcl/opengl/invert50FragmentShader.glsl +++ b/vcl/opengl/invert50FragmentShader.glsl @@ -7,6 +7,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#version 130 + /*precision mediump float;*/ void main() { diff --git a/vcl/opengl/lineFragmentShader.glsl b/vcl/opengl/lineFragmentShader.glsl index a8c73d6b80cc..5a01de35656a 100644 --- a/vcl/opengl/lineFragmentShader.glsl +++ b/vcl/opengl/lineFragmentShader.glsl @@ -7,6 +7,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#version 130 + varying float fade_factor; // 0->1 fade factor used for AA uniform vec4 color; diff --git a/vcl/opengl/maskFragmentShader.glsl b/vcl/opengl/maskFragmentShader.glsl index 2cc737759ab0..864869c89b8e 100644 --- a/vcl/opengl/maskFragmentShader.glsl +++ b/vcl/opengl/maskFragmentShader.glsl @@ -7,6 +7,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#version 130 + varying vec2 tex_coord; uniform sampler2D sampler; uniform vec4 color; diff --git a/vcl/opengl/maskedTextureFragmentShader.glsl b/vcl/opengl/maskedTextureFragmentShader.glsl index 75ce4ae76bd4..31c793897b77 100644 --- a/vcl/opengl/maskedTextureFragmentShader.glsl +++ b/vcl/opengl/maskedTextureFragmentShader.glsl @@ -7,6 +7,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#version 130 + /*precision mediump float;*/ varying vec2 tex_coord; varying vec2 mask_coord; diff --git a/vcl/opengl/maskedTextureVertexShader.glsl b/vcl/opengl/maskedTextureVertexShader.glsl index ab225a85a158..6b5f327dae3f 100644 --- a/vcl/opengl/maskedTextureVertexShader.glsl +++ b/vcl/opengl/maskedTextureVertexShader.glsl @@ -7,6 +7,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#version 130 + attribute vec4 position; attribute vec2 tex_coord_in; attribute vec2 mask_coord_in; diff --git a/vcl/opengl/replaceColorFragmentShader.glsl b/vcl/opengl/replaceColorFragmentShader.glsl index 6e845f012ac3..24f6008e2871 100644 --- a/vcl/opengl/replaceColorFragmentShader.glsl +++ b/vcl/opengl/replaceColorFragmentShader.glsl @@ -7,6 +7,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#version 130 + varying vec2 tex_coord; uniform sampler2D sampler; uniform vec4 search_color; diff --git a/vcl/opengl/solidFragmentShader.glsl b/vcl/opengl/solidFragmentShader.glsl index af7533604cef..b77e2578d6af 100644 --- a/vcl/opengl/solidFragmentShader.glsl +++ b/vcl/opengl/solidFragmentShader.glsl @@ -7,6 +7,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#version 130 + /*precision mediump float;*/ uniform vec4 color; diff --git a/vcl/opengl/textureFragmentShader.glsl b/vcl/opengl/textureFragmentShader.glsl index cc95f2ffb17c..b1fedcba567d 100644 --- a/vcl/opengl/textureFragmentShader.glsl +++ b/vcl/opengl/textureFragmentShader.glsl @@ -7,6 +7,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#version 130 + /* precision mediump float; */ varying vec2 tex_coord; uniform sampler2D sampler; diff --git a/vcl/opengl/textureVertexShader.glsl b/vcl/opengl/textureVertexShader.glsl index bb852f99f24a..7fbdcf1ebf1a 100644 --- a/vcl/opengl/textureVertexShader.glsl +++ b/vcl/opengl/textureVertexShader.glsl @@ -7,6 +7,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#version 130 + attribute vec4 position; attribute vec2 tex_coord_in; varying vec2 tex_coord; diff --git a/vcl/opengl/transformedTextureVertexShader.glsl b/vcl/opengl/transformedTextureVertexShader.glsl index 6f8d5f351cd0..3d67f78e0157 100644 --- a/vcl/opengl/transformedTextureVertexShader.glsl +++ b/vcl/opengl/transformedTextureVertexShader.glsl @@ -7,6 +7,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#version 130 + attribute vec4 position; attribute vec2 tex_coord_in; attribute vec2 mask_coord_in; |