aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/shader/texture01_xxx.fp
diff options
context:
space:
mode:
authorSven Gothel <sgothel@jausoft.com>2012-10-31 15:16:56 +0100
committerSven Gothel <sgothel@jausoft.com>2012-10-31 15:16:56 +0100
commit7dff066bb823dddb5d6e0e7672f5599afa5a43b9 (patch)
tree1981fa4c69ae8c2037ed17af5d2987b8cf6b55b1 /src/jogl/classes/jogamp/opengl/shader/texture01_xxx.fp
parentc2b328ea96b6cb16ca39f13d4bb4d1236c4b8a1d (diff)
Add OSX CALayer OpenGL 3 (core) support: Derive pixelformat from parent (GL3), use GL3.2 compatible shader; Use VBO in general.
Covered by: Auto unit tests: TestOffscreenLayer01GLCanvasAWT, TestOffscreenLayer02NewtCanvasAWT Manual: TestGearsES2AWT '-gl3 -layered'
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/shader/texture01_xxx.fp')
-rw-r--r--src/jogl/classes/jogamp/opengl/shader/texture01_xxx.fp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/jogl/classes/jogamp/opengl/shader/texture01_xxx.fp b/src/jogl/classes/jogamp/opengl/shader/texture01_xxx.fp
new file mode 100644
index 000000000..8b30b65f9
--- /dev/null
+++ b/src/jogl/classes/jogamp/opengl/shader/texture01_xxx.fp
@@ -0,0 +1,19 @@
+// Copyright 2012 JogAmp Community. All rights reserved.
+
+#if __VERSION__ >= 130
+ #define varying in
+ out vec4 mgl_FragColor;
+ #define texture2D texture
+#else
+ #define mgl_FragColor gl_FragColor
+#endif
+
+varying vec2 mgl_texCoord;
+
+uniform sampler2D mgl_Texture0;
+
+void main (void)
+{
+ mgl_FragColor = texture2D(mgl_Texture0, mgl_texCoord);
+}
+