aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01.vp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-04-23 06:12:10 +0200
committerSven Gothel <[email protected]>2011-04-23 06:12:10 +0200
commit48201a6ea6471eb5951edb735b36156ab3410a15 (patch)
treeb22314430e78ee9269f4fcb358b9b5a7dc8d1de7 /src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01.vp
parent54f58c0cb990eb2b4fc8c3be785cc47bde575f37 (diff)
Refactored graph: Reduce/remove data copy/recreation; Shader cleanup
- Pass the current GL context object where it's required - Introduce RenderState (which has ShaderState) to acquire/change shader related data (Region) - Shader Cleanup: User import for common stuff; use req. version - Reduce/remove data copy/recreation in *Region implementation - UI/RIButton: Use defaults I like :)
Diffstat (limited to 'src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01.vp')
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01.vp20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01.vp b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01.vp
index bc9ecb41e..298dce7ef 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01.vp
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01.vp
@@ -1,13 +1,17 @@
-//#version 100
+//Copyright 2010 JogAmp Community. All rights reserved.
-uniform mat4 mgl_PMVMatrix[2];
-attribute vec4 v_position;
-attribute vec2 texCoord;
+#ifdef GL_ES
+ #version 100
+#else
+ #version 110
+#endif
-varying vec2 v_texCoord;
+#include uniforms.glsl
+#include attributes.glsl
+#include varyings.glsl
void main(void)
{
- gl_Position = mgl_PMVMatrix[0] * mgl_PMVMatrix[1] * v_position;
- v_texCoord = texCoord.st;
-} \ No newline at end of file
+ gl_Position = gcu_PMVMatrix[0] * gcu_PMVMatrix[1] * vec4(gca_Vertices, 1);
+ gcv_TexCoord = gca_TexCoords;
+}