summaryrefslogtreecommitdiff
path: root/chart2/opengl
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/opengl')
-rw-r--r--chart2/opengl/screenTextFragmentShader.glsl17
-rw-r--r--chart2/opengl/screenTextVertexShader.glsl19
2 files changed, 36 insertions, 0 deletions
diff --git a/chart2/opengl/screenTextFragmentShader.glsl b/chart2/opengl/screenTextFragmentShader.glsl
new file mode 100644
index 000000000000..a8481034210a
--- /dev/null
+++ b/chart2/opengl/screenTextFragmentShader.glsl
@@ -0,0 +1,17 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * 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/.
+ */
+
+varying vec2 vTexCoord;
+uniform sampler2D TextTex;
+void main()
+{
+ gl_FragColor = vec4(texture2D(TextTex, vTexCoord).rgba);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/opengl/screenTextVertexShader.glsl b/chart2/opengl/screenTextVertexShader.glsl
new file mode 100644
index 000000000000..8d046f56394c
--- /dev/null
+++ b/chart2/opengl/screenTextVertexShader.glsl
@@ -0,0 +1,19 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * 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/.
+ */
+
+attribute vec3 vPosition;
+attribute vec2 texCoord;
+varying vec2 vTexCoord;
+void main()
+{
+ gl_Position = vec4(vPosition, 1);
+ vTexCoord = texCoord;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */