aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/OpenGL/GLBackend/ClipShader.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/OpenGL/GLBackend/ClipShader.cs')
-rw-r--r--src/OpenGL/GLBackend/ClipShader.cs40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/OpenGL/GLBackend/ClipShader.cs b/src/OpenGL/GLBackend/ClipShader.cs
new file mode 100644
index 00000000..a805716c
--- /dev/null
+++ b/src/OpenGL/GLBackend/ClipShader.cs
@@ -0,0 +1,40 @@
+using System;
+using OpenTK.Graphics.OpenGL;
+
+namespace go.GLBackend
+{
+ public class ClipShader : Shader
+ {
+ public ClipShader ()
+ {
+ vertSource = @"
+ #version 130
+
+ precision highp float;
+
+ uniform mat4 projection_matrix;
+ uniform mat4 modelview_matrix;
+
+ in vec2 in_position;
+
+ void main(void)
+ {
+ gl_Position = projection_matrix * modelview_matrix * vec4(in_position,0, 1);
+ }";
+
+ fragSource = @"
+ #version 130
+ precision highp float;
+
+ out vec4 out_frag_color;
+
+ void main(void)
+ {
+ out_frag_color = vec4(1.0,1.0,1.0,1.0);
+ }";
+
+ Compile ();
+ }
+ }
+}
+