From 41cd6c47b23975098cd155517790e018670785e7 Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Mon, 15 Jun 2009 23:12:27 +0000 Subject: Copied JOGL_2_SANDBOX r350 on to trunk; JOGL_2_SANDBOX branch is now closed git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@352 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4 --- src/demos/es2/perftst/shader/bin/nvidia/fcolor.bfp | Bin 0 -> 524 bytes src/demos/es2/perftst/shader/bin/nvidia/ftext.bfp | Bin 0 -> 620 bytes .../es2/perftst/shader/bin/nvidia/uni-vert-col.bvp | Bin 0 -> 6404 bytes .../es2/perftst/shader/bin/nvidia/vbo-vert-col.bvp | Bin 0 -> 864 bytes .../perftst/shader/bin/nvidia/vbo-vert-text.bvp | Bin 0 -> 876 bytes src/demos/es2/perftst/shader/fcolor.fp | 16 ++++++ src/demos/es2/perftst/shader/ftext.fp | 17 ++++++ .../perftst/shader/scripts/nvidia-apx/glslc-ff.bat | 9 +++ src/demos/es2/perftst/shader/uni-vert-col.vp | 61 +++++++++++++++++++++ src/demos/es2/perftst/shader/vbo-vert-col.vp | 19 +++++++ src/demos/es2/perftst/shader/vbo-vert-text.vp | 19 +++++++ 11 files changed, 141 insertions(+) create mode 100755 src/demos/es2/perftst/shader/bin/nvidia/fcolor.bfp create mode 100755 src/demos/es2/perftst/shader/bin/nvidia/ftext.bfp create mode 100755 src/demos/es2/perftst/shader/bin/nvidia/uni-vert-col.bvp create mode 100755 src/demos/es2/perftst/shader/bin/nvidia/vbo-vert-col.bvp create mode 100755 src/demos/es2/perftst/shader/bin/nvidia/vbo-vert-text.bvp create mode 100644 src/demos/es2/perftst/shader/fcolor.fp create mode 100644 src/demos/es2/perftst/shader/ftext.fp create mode 100755 src/demos/es2/perftst/shader/scripts/nvidia-apx/glslc-ff.bat create mode 100644 src/demos/es2/perftst/shader/uni-vert-col.vp create mode 100644 src/demos/es2/perftst/shader/vbo-vert-col.vp create mode 100644 src/demos/es2/perftst/shader/vbo-vert-text.vp (limited to 'src/demos/es2/perftst/shader') diff --git a/src/demos/es2/perftst/shader/bin/nvidia/fcolor.bfp b/src/demos/es2/perftst/shader/bin/nvidia/fcolor.bfp new file mode 100755 index 0000000..454354c Binary files /dev/null and b/src/demos/es2/perftst/shader/bin/nvidia/fcolor.bfp differ diff --git a/src/demos/es2/perftst/shader/bin/nvidia/ftext.bfp b/src/demos/es2/perftst/shader/bin/nvidia/ftext.bfp new file mode 100755 index 0000000..2807387 Binary files /dev/null and b/src/demos/es2/perftst/shader/bin/nvidia/ftext.bfp differ diff --git a/src/demos/es2/perftst/shader/bin/nvidia/uni-vert-col.bvp b/src/demos/es2/perftst/shader/bin/nvidia/uni-vert-col.bvp new file mode 100755 index 0000000..b89137d Binary files /dev/null and b/src/demos/es2/perftst/shader/bin/nvidia/uni-vert-col.bvp differ diff --git a/src/demos/es2/perftst/shader/bin/nvidia/vbo-vert-col.bvp b/src/demos/es2/perftst/shader/bin/nvidia/vbo-vert-col.bvp new file mode 100755 index 0000000..ba0c982 Binary files /dev/null and b/src/demos/es2/perftst/shader/bin/nvidia/vbo-vert-col.bvp differ diff --git a/src/demos/es2/perftst/shader/bin/nvidia/vbo-vert-text.bvp b/src/demos/es2/perftst/shader/bin/nvidia/vbo-vert-text.bvp new file mode 100755 index 0000000..9fe8667 Binary files /dev/null and b/src/demos/es2/perftst/shader/bin/nvidia/vbo-vert-text.bvp differ diff --git a/src/demos/es2/perftst/shader/fcolor.fp b/src/demos/es2/perftst/shader/fcolor.fp new file mode 100644 index 0000000..a94f705 --- /dev/null +++ b/src/demos/es2/perftst/shader/fcolor.fp @@ -0,0 +1,16 @@ + +#ifdef GL_ES + #define MEDIUMP mediump + #define HIGHP highp +#else + #define MEDIUMP + #define HIGHP +#endif + +varying HIGHP vec4 frontColor; + +void main (void) +{ + gl_FragColor = frontColor; +} + diff --git a/src/demos/es2/perftst/shader/ftext.fp b/src/demos/es2/perftst/shader/ftext.fp new file mode 100644 index 0000000..726cc43 --- /dev/null +++ b/src/demos/es2/perftst/shader/ftext.fp @@ -0,0 +1,17 @@ + +#ifdef GL_ES + #define MEDIUMP mediump + #define HIGHP highp +#else + #define MEDIUMP + #define HIGHP +#endif + +varying vec4 mgl_TexCoord0; +uniform sampler2D mgl_ActiveTexture; + +void main (void) +{ + gl_FragColor = vec4(texture2D(mgl_ActiveTexture, mgl_TexCoord0.st).rgb, 1.0); +} + diff --git a/src/demos/es2/perftst/shader/scripts/nvidia-apx/glslc-ff.bat b/src/demos/es2/perftst/shader/scripts/nvidia-apx/glslc-ff.bat new file mode 100755 index 0000000..bf184f9 --- /dev/null +++ b/src/demos/es2/perftst/shader/scripts/nvidia-apx/glslc-ff.bat @@ -0,0 +1,9 @@ +REM +REM You have to call it from the 'shader' directory, e.g.: +REM scripts\nvidia-apx\glslc-ff.bat +REM +IF !"%JOGLDIR%"==""! GOTO YESPATH +set JOGLDIR=..\lib +:YESPATH + +java -cp %JOGLDIR%\jogl.core.jar;%JOGLDIR%\jogl.gles2.jar;%JOGLDIR%\jogl.fixed.jar;%JOGLDIR%\jogl.sdk.jar javax.media.opengl.sdk.glsl.CompileShaderNVidia fcolor.fp vbo-vert-col.vp uni-vert-col.vp ftext.fp vbo-vert-text.vp diff --git a/src/demos/es2/perftst/shader/uni-vert-col.vp b/src/demos/es2/perftst/shader/uni-vert-col.vp new file mode 100644 index 0000000..0550a8f --- /dev/null +++ b/src/demos/es2/perftst/shader/uni-vert-col.vp @@ -0,0 +1,61 @@ + +#ifdef GL_ES + #define MEDIUMP mediump + #define HIGHP highp +#else + #define MEDIUMP + #define HIGHP +#endif + +uniform MEDIUMP mat4 mgl_PMVMatrix[2]; +uniform MEDIUMP vec4 mgl_Dummy0[16]; +uniform MEDIUMP vec4 mgl_Dummy1[16]; +uniform MEDIUMP vec4 mgl_Dummy2[16]; +uniform MEDIUMP vec4 mgl_Dummy3[16]; +uniform MEDIUMP vec4 mgl_Dummy4[16]; +uniform MEDIUMP vec4 mgl_Dummy5[16]; +uniform MEDIUMP vec4 mgl_Dummy6[16]; +uniform MEDIUMP vec4 mgl_Dummy7[16]; +uniform MEDIUMP vec4 mgl_Dummy8[16]; +uniform MEDIUMP vec4 mgl_Dummy9[16]; +uniform MEDIUMP vec4 mgl_Dummy10[16]; +uniform MEDIUMP vec4 mgl_Dummy11[16]; +/* +uniform MEDIUMP vec4 mgl_Dummy12[16]; +uniform MEDIUMP vec4 mgl_Dummy13[16]; +uniform MEDIUMP vec4 mgl_Dummy14[16]; +uniform MEDIUMP vec4 mgl_Dummy15[16]; + */ +attribute HIGHP vec4 mgl_Vertex; +attribute HIGHP vec4 mgl_Color; +varying HIGHP vec4 frontColor; + +void main(void) +{ + int i; + vec4 val=vec4(0); + + for(i=0; i<16; i++) { + val += mgl_Dummy0[i]; + val += mgl_Dummy1[i]; + val += mgl_Dummy2[i]; + val += mgl_Dummy3[i]; + val += mgl_Dummy4[i]; + val += mgl_Dummy5[i]; + val += mgl_Dummy6[i]; + val += mgl_Dummy7[i]; + val += mgl_Dummy8[i]; + val += mgl_Dummy9[i]; + val += mgl_Dummy10[i]; + val += mgl_Dummy11[i]; + /* + val += mgl_Dummy12[i]; + val += mgl_Dummy13[i]; + val += mgl_Dummy14[i]; + val += mgl_Dummy15[i]; + */ + } + + frontColor=mgl_Color+val; + gl_Position = mgl_PMVMatrix[0] * mgl_PMVMatrix[1] * mgl_Vertex; +} diff --git a/src/demos/es2/perftst/shader/vbo-vert-col.vp b/src/demos/es2/perftst/shader/vbo-vert-col.vp new file mode 100644 index 0000000..0348e90 --- /dev/null +++ b/src/demos/es2/perftst/shader/vbo-vert-col.vp @@ -0,0 +1,19 @@ + +#ifdef GL_ES + #define MEDIUMP mediump + #define HIGHP highp +#else + #define MEDIUMP + #define HIGHP +#endif + +uniform MEDIUMP mat4 mgl_PMVMatrix[2]; +attribute HIGHP vec4 mgl_Vertex; +attribute HIGHP vec4 mgl_Color; +varying HIGHP vec4 frontColor; + +void main(void) +{ + frontColor=mgl_Color; + gl_Position = mgl_PMVMatrix[0] * mgl_PMVMatrix[1] * mgl_Vertex; +} diff --git a/src/demos/es2/perftst/shader/vbo-vert-text.vp b/src/demos/es2/perftst/shader/vbo-vert-text.vp new file mode 100644 index 0000000..283d676 --- /dev/null +++ b/src/demos/es2/perftst/shader/vbo-vert-text.vp @@ -0,0 +1,19 @@ + +#ifdef GL_ES + #define MEDIUMP mediump + #define HIGHP highp +#else + #define MEDIUMP + #define HIGHP +#endif + +uniform MEDIUMP mat4 mgl_PMVMatrix[2]; +attribute HIGHP vec4 mgl_Vertex; +attribute HIGHP vec4 mgl_MultiTexCoord0; +varying vec4 mgl_TexCoord0; + +void main(void) +{ + mgl_TexCoord0 = mgl_MultiTexCoord0; + gl_Position = mgl_PMVMatrix[0] * mgl_PMVMatrix[1] * mgl_Vertex; +} -- cgit v1.2.3