summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderCode.java253
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderUtil.java24
-rwxr-xr-xsrc/jogl/classes/jogamp/graph/curve/opengl/RegionRendererImpl01.java8
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/TextRendererImpl01.java8
-rw-r--r--src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/FixedFuncPipeline.java16
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/ElektronenMultiplizierer.java10
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/GearsES2.java8
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/RedSquareES2.java8
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestFBOMRTNEWT01.java16
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLShaderState01NEWT.java24
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLShaderState02NEWT.java24
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestRulerNEWT01.java8
12 files changed, 279 insertions, 128 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderCode.java b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderCode.java
index 556345ee5..e347b4171 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderCode.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderCode.java
@@ -28,23 +28,36 @@
package com.jogamp.opengl.util.glsl;
-import com.jogamp.common.nio.Buffers;
-import com.jogamp.common.util.IOUtil;
-
-import javax.media.opengl.*;
+import java.io.BufferedInputStream;
+import java.io.BufferedReader;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.PrintStream;
+import java.io.StringReader;
+import java.net.URLConnection;
+import java.nio.Buffer;
+import java.nio.ByteBuffer;
+import java.nio.IntBuffer;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.Set;
+
+import javax.media.opengl.GL;
+import javax.media.opengl.GL2ES2;
+import javax.media.opengl.GLES2;
+import javax.media.opengl.GLException;
import jogamp.opengl.Debug;
-import java.util.*;
-import java.nio.*;
-import java.io.*;
-import java.net.*;
+import com.jogamp.common.nio.Buffers;
+import com.jogamp.common.util.IOUtil;
/**
* Convenient shader code class to use and instantiate vertex or fragment programs.
* <p>
* A documented example of how to use this code is available
- * {@link #create(GL2ES2, int, int, Class, String, String, String) here} and
+ * {@link #create(GL2ES2, int, Class, String, String, String, boolean) here} and
* {@link #create(GL2ES2, int, int, Class, String, String[], String, String) here}.
* </p>
*/
@@ -70,11 +83,12 @@ public class ShaderCode {
/**
* @param type either {@link GL2ES2#GL_VERTEX_SHADER} or {@link GL2ES2#GL_FRAGMENT_SHADER}
* @param count number of shaders
- * @param source string array containing the shader sources, organized as <code>source[count][strings-per-shader]</code>
+ * @param source CharSequence array containing the shader sources, organized as <code>source[count][strings-per-shader]</code>.
+ * May be either an immutable <code>String</code> - or mutable <code>StringBuilder</code> array.
*
* @throws IllegalArgumentException if <code>count</count> and <code>source.length</code> do not match
*/
- public ShaderCode(int type, int count, String[][] source) {
+ public ShaderCode(int type, int count, CharSequence[][] source) {
if(source.length != count) {
throw new IllegalArgumentException("shader number ("+count+") and sourceFiles array ("+source.length+") of different lenght.");
}
@@ -128,22 +142,28 @@ public class ShaderCode {
* @param count number of shaders
* @param context class used to help resolving the source location
* @param sourceFiles array of source locations, organized as <code>sourceFiles[count]</code>
+ * @param mutableStringBuilder if <code>true</code> method returns a mutable <code>StringBuilder</code> instance
+ * which can be edited later on at the costs of a String conversion when passing to
+ * {@link GL2ES2#glShaderSource(int, int, String[], IntBuffer)}.
+ * If <code>false</code> method returns an immutable <code>String</code> instance,
+ * which can be passed to {@link GL2ES2#glShaderSource(int, int, String[], IntBuffer)}
+ * at no additional costs.
*
* @throws IllegalArgumentException if <code>count</count> and <code>sourceFiles.length</code> do not match
* @see #readShaderSource(Class, String)
*/
- public static ShaderCode create(GL2ES2 gl, int type, int count, Class<?> context, String[] sourceFiles) {
+ public static ShaderCode create(GL2ES2 gl, int type, int count, Class<?> context, String[] sourceFiles, boolean mutableStringBuilder) {
if(null != gl && !ShaderUtil.isShaderCompilerAvailable(gl)) {
return null;
}
- String[][] shaderSources = null;
+ CharSequence[][] shaderSources = null;
if(null!=sourceFiles) {
// sourceFiles.length and count is validated in ctor
- shaderSources = new String[sourceFiles.length][1];
+ shaderSources = new CharSequence[sourceFiles.length][1];
for(int i=0; i<sourceFiles.length; i++) {
try {
- shaderSources[i][0] = readShaderSource(context, sourceFiles[i]);
+ shaderSources[i][0] = readShaderSource(context, sourceFiles[i], mutableStringBuilder);
} catch (IOException ioe) {
throw new RuntimeException("readShaderSource("+sourceFiles[i]+") error: ", ioe);
}
@@ -204,7 +224,7 @@ public class ShaderCode {
*
* @throws GLException if <code>type</code> is not supported
*
- * @see #create(GL2ES2, int, int, Class, String, String, String)
+ * @see #create(GL2ES2, int, Class, String, String, String, boolean)
*/
public static String getFileSuffix(boolean binary, int type) {
switch (type) {
@@ -225,7 +245,7 @@ public class ShaderCode {
*
* @throws GLException if <code>binFormat</code> is not supported
*
- * @see #create(GL2ES2, int, int, Class, String, String, String)
+ * @see #create(GL2ES2, int, Class, String, String, String, boolean)
*/
public static String getBinarySubPath(int binFormat) {
switch (binFormat) {
@@ -282,7 +302,7 @@ public class ShaderCode {
* sp0.add(gl, fp0, System.err);
* st.attachShaderProgram(gl, sp0, true);
* </pre>
- * A simplified entry point is {@link #create(GL2ES2, int, int, Class, String, String, String)}.
+ * A simplified entry point is {@link #create(GL2ES2, int, Class, String, String, String, boolean)}.
*
* <p>
* The location is finally being resolved using the <code>context</code> class, see {@link #readShaderBinary(Class, String)}.
@@ -297,6 +317,12 @@ public class ShaderCode {
* @param srcBasenames basenames w/o path or suffix relative to <code>srcRoot</code> for the shader's source code
* @param binRoot relative <i>root</i> path for <code>binBasenames</code>
* @param binBasename basename w/o path or suffix relative to <code>binRoot</code> for the shader's binary code
+ * @param mutableStringBuilder if <code>true</code> method returns a mutable <code>StringBuilder</code> instance
+ * which can be edited later on at the costs of a String conversion when passing to
+ * {@link GL2ES2#glShaderSource(int, int, String[], IntBuffer)}.
+ * If <code>false</code> method returns an immutable <code>String</code> instance,
+ * which can be passed to {@link GL2ES2#glShaderSource(int, int, String[], IntBuffer)}
+ * at no additional costs.
*
* @throws IllegalArgumentException if <code>count</count> and <code>srcBasenames.length</code> do not match
*
@@ -308,7 +334,8 @@ public class ShaderCode {
* @see #getBinarySubPath(int)
*/
public static ShaderCode create(GL2ES2 gl, int type, int count, Class<?> context,
- String srcRoot, String[] srcBasenames, String binRoot, String binBasename) {
+ String srcRoot, String[] srcBasenames, String binRoot, String binBasename,
+ boolean mutableStringBuilder) {
ShaderCode res = null;
final String srcPath[];
String srcPathString = null;
@@ -320,7 +347,7 @@ public class ShaderCode {
for(int i=0; i<srcPath.length; i++) {
srcPath[i] = srcRoot + '/' + srcBasenames[i] + "." + srcSuffix;
}
- res = create(gl, type, count, context, srcPath);
+ res = create(gl, type, count, context, srcPath, mutableStringBuilder);
if(null!=res) {
return res;
}
@@ -371,9 +398,9 @@ public class ShaderCode {
*
* Your invocation in org/test/glsl/MyShaderTest.java:
*
- * ShaderCode vp0 = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, 1, this.getClass(),
+ * ShaderCode vp0 = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, this.getClass(),
* "shader", "shader/bin", "vertex");
- * ShaderCode fp0 = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, 1, this.getClass(),
+ * ShaderCode fp0 = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, this.getClass(),
* "shader", "shader/bin", "fragment");
* ShaderProgram sp0 = new ShaderProgram();
* sp0.add(gl, vp0, System.err);
@@ -384,20 +411,25 @@ public class ShaderCode {
* @param gl current GL object to determine whether a shader compiler is available (if <code>source</code> is used),
* or to determine the shader binary format (if <code>binary</code> is used).
* @param type either {@link GL2ES2#GL_VERTEX_SHADER} or {@link GL2ES2#GL_FRAGMENT_SHADER}
- * @param count number of shaders, must be one
* @param context class used to help resolving the source and binary location
* @param srcRoot relative <i>root</i> path for <code>basename</code>
* @param binRoot relative <i>root</i> path for <code>basename</code>
+ * @param mutableStringBuilder TODO
* @param basenames basename w/o path or suffix relative to <code>srcRoot</code> and <code>binRoot</code>
* for the shader's source and binary code.
- *
+ * @param mutableStringBuilder if <code>true</code> method returns a mutable <code>StringBuilder</code> instance
+ * which can be edited later on at the costs of a String conversion when passing to
+ * {@link GL2ES2#glShaderSource(int, int, String[], IntBuffer)}.
+ * If <code>false</code> method returns an immutable <code>String</code> instance,
+ * which can be passed to {@link GL2ES2#glShaderSource(int, int, String[], IntBuffer)}
+ * at no additional costs.
* @throws IllegalArgumentException if <code>count</count> is not 1
*
* @see #create(GL2ES2, int, int, Class, String, String[], String, String)
*/
- public static ShaderCode create(GL2ES2 gl, int type, int count, Class<?> context,
- String srcRoot, String binRoot, String basename) {
- return create(gl, type, count, context, srcRoot, new String[] { basename }, binRoot, basename );
+ public static ShaderCode create(GL2ES2 gl, int type, Class<?> context,
+ String srcRoot, String binRoot, String basename, boolean mutableStringBuilder) {
+ return create(gl, type, 1, context, srcRoot, new String[] { basename }, binRoot, basename, mutableStringBuilder );
}
/**
@@ -418,9 +450,9 @@ public class ShaderCode {
return "UNKNOWN_SHADER";
}
- public int shaderBinaryFormat() { return shaderBinaryFormat; }
- public Buffer shaderBinary() { return shaderBinary; }
- public String[][] shaderSource() { return shaderSource; }
+ public int shaderBinaryFormat() { return shaderBinaryFormat; }
+ public Buffer shaderBinary() { return shaderBinary; }
+ public CharSequence[][] shaderSource() { return shaderSource; }
public boolean isValid() { return valid; }
@@ -434,6 +466,9 @@ public class ShaderCode {
// Create & Compile the vertex/fragment shader objects
if(null!=shaderSource) {
+ if(DEBUG_CODE) {
+ dumpShaderSource(System.err);
+ }
valid=ShaderUtil.createAndCompileShader(gl, shader, shaderType,
shaderSource, verboseOut);
} else if(null!=shaderBinary) {
@@ -473,7 +508,7 @@ public class ShaderCode {
return id;
}
public String toString() {
- StringBuffer buf = new StringBuffer("ShaderCode[id="+id+", type="+shaderTypeStr()+", valid="+valid+", shader: ");
+ StringBuilder buf = new StringBuilder("ShaderCode[id="+id+", type="+shaderTypeStr()+", valid="+valid+", shader: ");
for(int i=0; i<shader.remaining(); i++) {
buf.append(" "+shader.get(i));
}
@@ -490,38 +525,140 @@ public class ShaderCode {
out.println("<no shader source>");
return;
}
- int sourceNum = (null!=shaderSource)?shaderSource.length:0;
- int shaderNum = (null!=shader)?shader.capacity():0;
- for(int i=0; i<shaderNum; i++) {
+ final int sourceCount = (null!=shaderSource)?shaderSource.length:0;
+ final int shaderCount = (null!=shader)?shader.capacity():0;
+ for(int i=0; i<shaderCount; i++) {
out.println("");
- out.println("Shader #"+i+"/"+shaderNum+" name "+shader.get(i));
+ out.println("Shader #"+i+"/"+shaderCount+" name "+shader.get(i));
out.println("--------------------------------------------------------------");
- if(i>=sourceNum) {
+ if(i>=sourceCount) {
out.println("<no shader source>");
} else {
- String[] src = shaderSource[i];
+ CharSequence[] src = shaderSource[i];
+ int lineno=0;
+
for(int j=0; j<src.length; j++) {
- out.println("Segment "+j+"/"+src.length+" :");
- out.println(src[j]);
- out.println("");
+ out.printf("%4d: // Segment %d/%d: \n", lineno, j, src.length);
+ final BufferedReader reader = new BufferedReader(new StringReader(src[j].toString()));
+ String line = null;
+ try {
+ while ((line = reader.readLine()) != null) {
+ lineno++;
+ out.printf("%4d: %s\n", lineno, line);
+ }
+ } catch (IOException e) { /* impossible .. StringReader */ }
}
}
out.println("--------------------------------------------------------------");
}
}
+
+ /**
+ * Adds <code>data</code> after the line containing <code>tag</code>.
+ * <p>
+ * Note: The shader source to be edit must be created using a mutable StringBuilder.
+ * </p>
+ *
+ * @param shaderIdx the shader index to be used.
+ * @param tag search string
+ * @param fromIndex start search <code>tag</code> begininig with this index
+ * @param data the text to be inserted. Shall end with an EOL '\n' character.
+ * @return index after the inserted <code>data</code>
+ */
+ public int insertShaderSource(int shaderIdx, String tag, int fromIndex, CharSequence data) {
+ if(null==shaderSource) {
+ throw new IllegalStateException("no shader source");
+ }
+ final int shaderCount = (null!=shader)?shader.capacity():0;
+ if(0>shaderIdx || shaderIdx>=shaderCount) {
+ throw new IndexOutOfBoundsException("shaderIdx not within shader bounds [0.."+(shaderCount-1)+"]: "+shaderIdx);
+ }
+ final int sourceCount = (null!=shaderSource)?shaderSource.length:0;
+ if(shaderIdx>=sourceCount) {
+ throw new IndexOutOfBoundsException("shaderIdx not within source bounds [0.."+(sourceCount-1)+"]: "+shaderIdx);
+ }
+ final CharSequence[] src = shaderSource[shaderIdx];
+ int curEndIndex = 0;
+ for(int j=0; j<src.length; j++) {
+ if( !(src[j] instanceof StringBuilder) ) {
+ throw new IllegalStateException("shader source not a mutable StringBuilder, but CharSequence of type: "+src[j].getClass().getName());
+ }
+ final StringBuilder sb = (StringBuilder)src[j];
+ curEndIndex += sb.length();
+ if(fromIndex < curEndIndex) {
+ int insertIdx = sb.indexOf(tag, fromIndex);
+ if(0<=insertIdx) {
+ insertIdx += tag.length();
+ int eol = sb.indexOf("\n", insertIdx); // eol: covers \n and \r\n
+ if(0>eol) {
+ eol = sb.indexOf("\r", insertIdx); // eol: covers \r 'only'
+ }
+ if(0<eol) {
+ insertIdx = eol+1; // eol found
+ } else {
+ sb.insert(insertIdx, "\n"); // add eol
+ insertIdx++;
+ }
+ sb.insert(insertIdx, data);
+ return insertIdx+data.length();
+ }
+ }
+ }
+ return -1;
+ }
- private static int readShaderSource(Class<?> context, URLConnection conn, StringBuffer result, int lineno) throws IOException {
+ /**
+ * Adds <code>data</code> at <code>offset</code> in shader source for shader <code>shaderIdx</code>.
+ * <p>
+ * Note: The shader source to be edit must be created using a mutable StringBuilder.
+ * </p>
+ *
+ * @param shaderIdx the shader index to be used.
+ * @param position in shader source segments of shader <code>shaderIdx</code>
+ * @param data the text to be inserted. Shall end with an EOL '\n' character.
+ * @return index after the inserted <code>data</code>
+ */
+ public int insertShaderSource(int shaderIdx, int position, CharSequence data) {
+ if(null==shaderSource) {
+ throw new IllegalStateException("no shader source");
+ }
+ final int shaderCount = (null!=shader)?shader.capacity():0;
+ if(0>shaderIdx || shaderIdx>=shaderCount) {
+ throw new IndexOutOfBoundsException("shaderIdx not within shader bounds [0.."+(shaderCount-1)+"]: "+shaderIdx);
+ }
+ final int sourceCount = (null!=shaderSource)?shaderSource.length:0;
+ if(shaderIdx>=sourceCount) {
+ throw new IndexOutOfBoundsException("shaderIdx not within source bounds [0.."+(sourceCount-1)+"]: "+shaderIdx);
+ }
+ final CharSequence[] src = shaderSource[shaderIdx];
+ int curEndIndex = 0;
+ for(int j=0; j<src.length; j++) {
+ if( !(src[j] instanceof StringBuilder) ) {
+ throw new IllegalStateException("shader source not a mutable StringBuilder, but CharSequence of type: "+src[j].getClass().getName());
+ }
+ final StringBuilder sb = (StringBuilder)src[j];
+ curEndIndex += sb.length();
+ if(position < curEndIndex) {
+ sb.insert(position, data);
+ return position+data.length();
+ }
+ }
+ return -1;
+ }
+
+ private static int readShaderSource(Class<?> context, URLConnection conn, StringBuilder result, int lineno) throws IOException {
if(DEBUG_CODE) {
- System.err.printf("%3d: // %s\n", lineno, conn.getURL());
+ if(0 == lineno) {
+ result.append("// "+conn.getURL().toExternalForm()+"\n");
+ } else {
+ result.append("// included @ line "+lineno+": "+conn.getURL().toExternalForm()+"\n");
+ }
}
final BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));
try {
String line = null;
while ((line = reader.readLine()) != null) {
lineno++;
- if(DEBUG_CODE) {
- System.err.printf("%3d: %s\n", lineno, line);
- }
if (line.startsWith("#include ")) {
String includeFile = line.substring(9).trim();
URLConnection nextConn = null;
@@ -554,40 +691,38 @@ public class ShaderCode {
* @param result
* @throws IOException
*/
- public static void readShaderSource(Class<?> context, URLConnection conn, StringBuffer result) throws IOException {
- if(DEBUG_CODE) {
- System.err.println();
- System.err.println("// -----------------------------------------------------------");
- }
+ public static void readShaderSource(Class<?> context, URLConnection conn, StringBuilder result) throws IOException {
readShaderSource(context, conn, result, 0);
- if(DEBUG_CODE) {
- System.err.println("// -----------------------------------------------------------");
- System.err.println();
- }
}
/**
* Reads shader source located in <code>path</code>,
* either relative to the <code>context</code> class or absolute <i>as-is</i>.
* <p>
- * Final location lookup is perfomed via {@link ClassLoader#getResource(String)} and {@link ClassLoader#getSystemResource(String)},
+ * Final location lookup is performed via {@link ClassLoader#getResource(String)} and {@link ClassLoader#getSystemResource(String)},
* see {@link IOUtil#getResource(Class, String)}.
* </p>
*
* @param context class used to help resolve the source location
* @param path location of shader source
+ * @param mutableStringBuilder if <code>true</code> method returns a mutable <code>StringBuilder</code> instance
+ * which can be edited later on at the costs of a String conversion when passing to
+ * {@link GL2ES2#glShaderSource(int, int, String[], IntBuffer)}.
+ * If <code>false</code> method returns an immutable <code>String</code> instance,
+ * which can be passed to {@link GL2ES2#glShaderSource(int, int, String[], IntBuffer)}
+ * at no additional costs.
* @throws IOException
*
* @see IOUtil#getResource(Class, String)
*/
- public static String readShaderSource(Class<?> context, String path) throws IOException {
+ public static CharSequence readShaderSource(Class<?> context, String path, boolean mutableStringBuilder) throws IOException {
URLConnection conn = IOUtil.getResource(context, path);
if (conn == null) {
return null;
}
- StringBuffer result = new StringBuffer();
+ StringBuilder result = new StringBuilder();
readShaderSource(context, conn, result);
- return result.toString();
+ return mutableStringBuilder ? result : result.toString();
}
/**
@@ -621,7 +756,7 @@ public class ShaderCode {
// Internals only below this point
//
- protected String[][] shaderSource = null;
+ protected CharSequence[][] shaderSource = null;
protected Buffer shaderBinary = null;
protected int shaderBinaryFormat = -1;
protected IntBuffer shader = null;
diff --git a/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderUtil.java b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderUtil.java
index d8aa1aa7f..40c052498 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderUtil.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderUtil.java
@@ -200,7 +200,7 @@ public class ShaderUtil {
return info.shaderCompilerAvailable.booleanValue();
}
- public static void shaderSource(GL _gl, int shader, java.lang.String[] source)
+ public static void shaderSource(GL _gl, int shader, CharSequence[] source)
{
final GL2ES2 gl = _gl.getGL2ES2();
if(!isShaderCompilerAvailable(_gl)) {
@@ -215,11 +215,27 @@ public class ShaderUtil {
IntBuffer lengths = Buffers.newDirectIntBuffer(count);
for(int i=0; i<count; i++) {
lengths.put(i, source[i].length());
+ }
+ if(source instanceof String[]) {
+ // rare case ..
+ gl.glShaderSource(shader, count, (String[])source, lengths);
+ } else {
+ final String[] tmp = new String[source.length];
+ for(int i = source.length - 1; i>=0; i--) {
+ final CharSequence csq = source[i];
+ if(csq instanceof String) {
+ // if ShaderCode.create(.. mutableStringBuffer == false )
+ tmp[i] = (String) csq;
+ } else {
+ // if ShaderCode.create(.. mutableStringBuffer == true )
+ tmp[i] = source[i].toString();
+ }
+ }
+ gl.glShaderSource(shader, count, tmp, lengths);
}
- gl.glShaderSource(shader, count, source, lengths);
}
- public static void shaderSource(GL _gl, IntBuffer shaders, java.lang.String[][] sources)
+ public static void shaderSource(GL _gl, IntBuffer shaders, CharSequence[][] sources)
{
int sourceNum = (null!=sources)?sources.length:0;
int shaderNum = (null!=shaders)?shaders.remaining():0;
@@ -312,7 +328,7 @@ public class ShaderUtil {
}
public static boolean createAndCompileShader(GL _gl, IntBuffer shader, int shaderType,
- java.lang.String[][] sources,
+ CharSequence[][] sources,
PrintStream verboseOut)
{
final GL2ES2 gl = _gl.getGL2ES2();
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/RegionRendererImpl01.java b/src/jogl/classes/jogamp/graph/curve/opengl/RegionRendererImpl01.java
index 32a2f0b73..117faafb8 100755
--- a/src/jogl/classes/jogamp/graph/curve/opengl/RegionRendererImpl01.java
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/RegionRendererImpl01.java
@@ -56,10 +56,10 @@ public class RegionRendererImpl01 extends RegionRenderer {
protected boolean initShaderProgram(GL2ES2 gl) {
final ShaderState st = rs.getShaderState();
- ShaderCode rsVp = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, 1, RegionRendererImpl01.class,
- "shader", "shader/bin", getVertexShaderName(gl));
- ShaderCode rsFp = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, 1, RegionRendererImpl01.class,
- "shader", "shader/bin", getFragmentShaderName(gl));
+ ShaderCode rsVp = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, RegionRendererImpl01.class, "shader",
+ "shader/bin", getVertexShaderName(gl), false);
+ ShaderCode rsFp = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, RegionRendererImpl01.class, "shader",
+ "shader/bin", getFragmentShaderName(gl), false);
ShaderProgram sp = new ShaderProgram();
sp.add(rsVp);
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/TextRendererImpl01.java b/src/jogl/classes/jogamp/graph/curve/opengl/TextRendererImpl01.java
index 05d0707e2..158f0240a 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/TextRendererImpl01.java
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/TextRendererImpl01.java
@@ -49,10 +49,10 @@ public class TextRendererImpl01 extends TextRenderer {
protected boolean initShaderProgram(GL2ES2 gl){
final ShaderState st = rs.getShaderState();
- ShaderCode rsVp = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, 1, TextRendererImpl01.class,
- "shader", "shader/bin", getVertexShaderName(gl));
- ShaderCode rsFp = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, 1, TextRendererImpl01.class,
- "shader", "shader/bin", getFragmentShaderName(gl));
+ ShaderCode rsVp = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, TextRendererImpl01.class, "shader",
+ "shader/bin", getVertexShaderName(gl), false);
+ ShaderCode rsFp = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, TextRendererImpl01.class, "shader",
+ "shader/bin", getFragmentShaderName(gl), false);
ShaderProgram sp = new ShaderProgram();
sp.add(rsVp);
diff --git a/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/FixedFuncPipeline.java b/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/FixedFuncPipeline.java
index 41a694e9e..bfe2e13c2 100644
--- a/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/FixedFuncPipeline.java
+++ b/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/FixedFuncPipeline.java
@@ -409,17 +409,17 @@ public class FixedFuncPipeline {
this.shaderState.setVerbose(verbose);
ShaderCode vertexColor, vertexColorLight, fragmentColor, fragmentColorTexture;
- vertexColor = ShaderCode.create( gl, gl.GL_VERTEX_SHADER, 1, shaderRootClass,
- shaderSrcRoot, shaderBinRoot, vertexColorFile);
+ vertexColor = ShaderCode.create( gl, gl.GL_VERTEX_SHADER, shaderRootClass, shaderSrcRoot,
+ shaderBinRoot, vertexColorFile, false);
- vertexColorLight = ShaderCode.create( gl, gl.GL_VERTEX_SHADER, 1, shaderRootClass,
- shaderSrcRoot, shaderBinRoot, vertexColorLightFile);
+ vertexColorLight = ShaderCode.create( gl, gl.GL_VERTEX_SHADER, shaderRootClass, shaderSrcRoot,
+ shaderBinRoot, vertexColorLightFile, false);
- fragmentColor = ShaderCode.create( gl, gl.GL_FRAGMENT_SHADER, 1, shaderRootClass,
- shaderSrcRoot, shaderBinRoot, fragmentColorFile);
+ fragmentColor = ShaderCode.create( gl, gl.GL_FRAGMENT_SHADER, shaderRootClass, shaderSrcRoot,
+ shaderBinRoot, fragmentColorFile, false);
- fragmentColorTexture = ShaderCode.create( gl, gl.GL_FRAGMENT_SHADER, 1, shaderRootClass,
- shaderSrcRoot, shaderBinRoot, fragmentColorTextureFile);
+ fragmentColorTexture = ShaderCode.create( gl, gl.GL_FRAGMENT_SHADER, shaderRootClass, shaderSrcRoot,
+ shaderBinRoot, fragmentColorTextureFile, false);
shaderProgramColor = new ShaderProgram();
shaderProgramColor.add(vertexColor);
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/ElektronenMultiplizierer.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/ElektronenMultiplizierer.java
index 582335ae7..cb3eb4351 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/ElektronenMultiplizierer.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/ElektronenMultiplizierer.java
@@ -231,11 +231,11 @@ public class ElektronenMultiplizierer implements GLEventListener {
gl.setSwapInterval(1);
st = new ShaderState();
- final ShaderCode vp0 = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, 1, this.getClass(),
- "shader", "shader/bin", "default");
- final ShaderCode fp0 = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, 1, this.getClass(),
- "shader", "shader/bin", "elektronenmultiplizierer_development");
- // "shader", "shader/bin", "elektronenmultiplizierer_port");
+ final ShaderCode vp0 = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, this.getClass(), "shader",
+ "shader/bin", "default", false);
+ final ShaderCode fp0 = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, this.getClass(), "shader",
+ "shader/bin", "elektronenmultiplizierer_development", false);
+ // "shader", "shader/bin", "elektronenmultiplizierer_port", false);
final ShaderProgram sp0 = new ShaderProgram();
sp0.add(gl, vp0, System.err);
sp0.add(gl, fp0, System.err);
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/GearsES2.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/GearsES2.java
index 81e3a5c80..de9a04705 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/GearsES2.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/GearsES2.java
@@ -114,10 +114,10 @@ public class GearsES2 implements GLEventListener {
st = new ShaderState();
// st.setVerbose(true);
- final ShaderCode vp0 = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, 1, this.getClass(),
- "shader", "shader/bin", "gears");
- final ShaderCode fp0 = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, 1, this.getClass(),
- "shader", "shader/bin", "gears");
+ final ShaderCode vp0 = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, this.getClass(), "shader",
+ "shader/bin", "gears", false);
+ final ShaderCode fp0 = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, this.getClass(), "shader",
+ "shader/bin", "gears", false);
final ShaderProgram sp0 = new ShaderProgram();
sp0.add(gl, vp0, System.err);
sp0.add(gl, fp0, System.err);
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/RedSquareES2.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/RedSquareES2.java
index dcda10426..a24662568 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/RedSquareES2.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/RedSquareES2.java
@@ -78,10 +78,10 @@ public class RedSquareES2 implements GLEventListener {
st = new ShaderState();
st.setVerbose(true);
- final ShaderCode vp0 = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, 1, this.getClass(),
- "shader", "shader/bin", "RedSquareShader");
- final ShaderCode fp0 = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, 1, this.getClass(),
- "shader", "shader/bin", "RedSquareShader");
+ final ShaderCode vp0 = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, this.getClass(), "shader",
+ "shader/bin", "RedSquareShader", false);
+ final ShaderCode fp0 = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, this.getClass(), "shader",
+ "shader/bin", "RedSquareShader", false);
final ShaderProgram sp0 = new ShaderProgram();
sp0.add(gl, vp0, System.err);
sp0.add(gl, fp0, System.err);
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestFBOMRTNEWT01.java b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestFBOMRTNEWT01.java
index 7227b0215..9b26b467e 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestFBOMRTNEWT01.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestFBOMRTNEWT01.java
@@ -72,10 +72,10 @@ public class TestFBOMRTNEWT01 extends UITestCase {
final ShaderState st = new ShaderState();
// st.setVerbose(true);
- final ShaderCode vp0 = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, 1, RedSquareES2.class,
- "shader", "shader/bin", "fbo-mrt-1");
- final ShaderCode fp0 = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, 1, RedSquareES2.class,
- "shader", "shader/bin", "fbo-mrt-1");
+ final ShaderCode vp0 = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, RedSquareES2.class, "shader",
+ "shader/bin", "fbo-mrt-1", false);
+ final ShaderCode fp0 = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, RedSquareES2.class, "shader",
+ "shader/bin", "fbo-mrt-1", false);
final ShaderProgram sp0 = new ShaderProgram();
sp0.add(gl, vp0, System.err);
sp0.add(gl, fp0, System.err);
@@ -85,10 +85,10 @@ public class TestFBOMRTNEWT01 extends UITestCase {
Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
st.attachShaderProgram(gl, sp0, false);
- final ShaderCode vp1 = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, 1, RedSquareES2.class,
- "shader", "shader/bin", "fbo-mrt-2");
- final ShaderCode fp1 = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, 1, RedSquareES2.class,
- "shader", "shader/bin", "fbo-mrt-2");
+ final ShaderCode vp1 = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, RedSquareES2.class, "shader",
+ "shader/bin", "fbo-mrt-2", false);
+ final ShaderCode fp1 = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, RedSquareES2.class, "shader",
+ "shader/bin", "fbo-mrt-2", false);
final ShaderProgram sp1 = new ShaderProgram();
sp1.add(gl, vp1, System.err);
sp1.add(gl, fp1, System.err);
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLShaderState01NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLShaderState01NEWT.java
index 037a973f5..fb05e26d0 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLShaderState01NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLShaderState01NEWT.java
@@ -72,10 +72,10 @@ public class TestGLSLShaderState01NEWT extends UITestCase {
// test code ..
final ShaderState st = new ShaderState();
- final ShaderCode rsVp = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, 1, RedSquareES2.class,
- "shader", "shader/bin", "RedSquareShader");
- final ShaderCode rsFp = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, 1, RedSquareES2.class,
- "shader", "shader/bin", "RedSquareShader");
+ final ShaderCode rsVp = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, RedSquareES2.class, "shader",
+ "shader/bin", "RedSquareShader", false);
+ final ShaderCode rsFp = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, RedSquareES2.class, "shader",
+ "shader/bin", "RedSquareShader", false);
final ShaderProgram sp = new ShaderProgram();
Assert.assertTrue(0>sp.program());
@@ -201,10 +201,10 @@ public class TestGLSLShaderState01NEWT extends UITestCase {
// test code ..
final ShaderState st = new ShaderState();
- final ShaderCode rsVp = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, 1, RedSquareES2.class,
- "shader", "shader/bin", "RedSquareShader");
- final ShaderCode rsFp = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, 1, RedSquareES2.class,
- "shader", "shader/bin", "RedSquareShader");
+ final ShaderCode rsVp = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, RedSquareES2.class, "shader",
+ "shader/bin", "RedSquareShader", false);
+ final ShaderCode rsFp = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, RedSquareES2.class, "shader",
+ "shader/bin", "RedSquareShader", false);
final ShaderProgram sp = new ShaderProgram();
sp.add(rsVp);
@@ -289,10 +289,10 @@ public class TestGLSLShaderState01NEWT extends UITestCase {
// test code ..
final ShaderState st = new ShaderState();
- final ShaderCode rsVp = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, 1, RedSquareES2.class,
- "shader", "shader/bin", "RedSquareShader");
- final ShaderCode rsFp = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, 1, RedSquareES2.class,
- "shader", "shader/bin", "RedSquareShader");
+ final ShaderCode rsVp = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, RedSquareES2.class, "shader",
+ "shader/bin", "RedSquareShader", false);
+ final ShaderCode rsFp = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, RedSquareES2.class, "shader",
+ "shader/bin", "RedSquareShader", false);
final ShaderProgram sp = new ShaderProgram();
sp.add(rsVp);
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLShaderState02NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLShaderState02NEWT.java
index 0efb63dca..645096554 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLShaderState02NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLShaderState02NEWT.java
@@ -79,12 +79,12 @@ public class TestGLSLShaderState02NEWT extends UITestCase {
// test code ..
final ShaderState st = new ShaderState();
- final ShaderCode rsVp0 = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, 1, RedSquareES2.class,
- "shader", "shader/bin", "RedSquareShader");
- final ShaderCode rsFp0 = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, 1, RedSquareES2.class,
- "shader", "shader/bin", "RedSquareShader");
- final ShaderCode rsFp1 = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, 1, RedSquareES2.class,
- "shader", "shader/bin", "RedSquareShader2");
+ final ShaderCode rsVp0 = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, RedSquareES2.class, "shader",
+ "shader/bin", "RedSquareShader", false);
+ final ShaderCode rsFp0 = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, RedSquareES2.class, "shader",
+ "shader/bin", "RedSquareShader", false);
+ final ShaderCode rsFp1 = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, RedSquareES2.class, "shader",
+ "shader/bin", "RedSquareShader2", false);
final ShaderProgram sp1 = new ShaderProgram();
sp1.add(rsVp0);
@@ -249,12 +249,12 @@ public class TestGLSLShaderState02NEWT extends UITestCase {
// test code ..
final ShaderState st = new ShaderState();
- final ShaderCode rsVp0 = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, 1, RedSquareES2.class,
- "shader", "shader/bin", "RedSquareShader");
- final ShaderCode rsFp0 = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, 1, RedSquareES2.class,
- "shader", "shader/bin", "RedSquareShader");
- final ShaderCode rsFp1 = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, 1, RedSquareES2.class,
- "shader", "shader/bin", "RedSquareShader2");
+ final ShaderCode rsVp0 = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, RedSquareES2.class, "shader",
+ "shader/bin", "RedSquareShader", false);
+ final ShaderCode rsFp0 = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, RedSquareES2.class, "shader",
+ "shader/bin", "RedSquareShader", false);
+ final ShaderCode rsFp1 = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, RedSquareES2.class, "shader",
+ "shader/bin", "RedSquareShader2", false);
final ShaderProgram sp1 = new ShaderProgram();
sp1.add(rsVp0);
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestRulerNEWT01.java b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestRulerNEWT01.java
index 12122cffc..f6e46da6e 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestRulerNEWT01.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestRulerNEWT01.java
@@ -72,10 +72,10 @@ public class TestRulerNEWT01 extends UITestCase {
// test code ..
final ShaderState st = new ShaderState();
- final ShaderCode vp0 = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, 1, RedSquareES2.class,
- "shader", "shader/bin", "default");
- final ShaderCode fp0 = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, 1, RedSquareES2.class,
- "shader", "shader/bin", "ruler");
+ final ShaderCode vp0 = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, RedSquareES2.class, "shader",
+ "shader/bin", "default", false);
+ final ShaderCode fp0 = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, RedSquareES2.class, "shader",
+ "shader/bin", "ruler", false);
final ShaderProgram sp0 = new ShaderProgram();
sp0.add(gl, vp0, System.err);
<!-- <jvmarg value="-Dgluegen.debug.NativeLibrary=true"/> <jvmarg value="-Dgluegen.debug.ProcAddressHelper=true"/> <jvmarg value="-verbose:jni"/> <jvmarg value="-client"/> --> <formatter usefile="false" type="plain"/> <formatter usefile="true" type="xml"/> <classpath refid="junit.run.classpath"/> <batchtest todir="${results}"> <fileset dir="${build_t.java}"> <include name="${test.junit.rel}/**/*Test*"/> <exclude name="**/*$$*"/> </fileset> <formatter usefile="false" type="brief"/> <formatter usefile="true" type="xml"/> </batchtest> </junit> </target> <target name="junit.run.settings" depends="init, gluegen.cpptasks.detect.os"> <!-- Use absolute path --> <property name="gluegen.lib.abs" location="${gluegen.lib}" /> <property name="build_t.lib.abs" location="${build_t.lib}" /> <delete quiet="true"> <fileset dir="${build}/test/results" includes="**"/> <fileset dir="${build}/test/results-x32" includes="**"/> <fileset file="${build}/${test.archive.name}.7z"/> </delete> <mkdir dir="${build}/test/results"/> </target> <target name="junit.run.local.d32" if="isOSX"> <var name="jvmDataModel.arg" unset="true"/> <var name="jvmDataModel.arg" value="-d32"/> <antcall target="junit.run.local" inheritRefs="true" inheritAll="true"/> <mkdir dir="${build}/test/results-x32"/> <move todir="${build}/test/results-x32"> <fileset dir="${build}/test/results" includes="**" /> </move> <mkdir dir="${build}/test/results"/> <var name="jvmDataModel.arg" unset="true"/> <var name="jvmDataModel.arg" value="-d64"/> </target> <target name="junit.run.tests" depends="junit.run.local.d32, junit.run.local, junit.run.remote.ssh, junit.run.remote.adb"/> <target name="junit.run.if.enabled" unless="junit.is.disabled"> <antcall target="junit.run.tests" inheritRefs="true" inheritAll="true"/> </target> <target name="junit.run.if.disabled" if="junit.is.disabled"> <copy todir="${build}/test/results" file="${gluegen.root}/make/lib/TEST-com.jogamp.junit.DisabledTest.xml"/> </target> <target name="junit.run" depends="junit.run.settings, junit.run.if.enabled, junit.run.if.disabled"> <antcall target="test-zip-archive" inheritRefs="true" /> </target> <!-- Hook all junit.test* .. --> <target name="java.generate" depends="junit.test1.java.generate"/> <target name="native.build" depends="c.configure, junit.test1.c.build" unless="build.javaonly"> <antcall target="gluegen.cpptasks.striplibs" inheritRefs="true"> <param name="libdir" value="${build_t.lib}"/> </antcall> </target> <!-- junit.test1 --> <target name="junit.test1.java.generate"> <echo message=" - - - junit.test1.java.generate" /> <dirset id="stub.includes.fileset.test" dir="."> <include name="${test.junit.generation.dir}/**"/> <include name="${stub.includes.dir}/gluegen" /> <include name="${stub.includes.dir}/macosx" /> <include name="${stub.includes.dir}/unix" /> <include name="${stub.includes.dir}/windows" /> </dirset> <gluegen src="${test.junit.generation.dir}/test1-gluegen.c" outputRootDir="${build_t.gen}" config="${test.junit.generation.dir}/test1-gluegen.cfg" literalInclude="${test.junit.generation.dir}" includeRefid="stub.includes.fileset.test" emitter="com.jogamp.gluegen.JavaEmitter" dumpCPP="false" debug="false"> <classpath refid="gluegen.classpath" /> </gluegen> <gluegen src="${test.junit.generation.dir}/test1-gluegen.c" outputRootDir="${build_t.gen}" config="${test.junit.generation.dir}/test1p1-gluegen.cfg" literalInclude="${test.junit.generation.dir}" includeRefid="stub.includes.fileset.test" emitter="com.jogamp.gluegen.JavaEmitter" dumpCPP="false" debug="false"> <classpath refid="gluegen.classpath" /> </gluegen> <gluegen src="${test.junit.generation.dir}/test1-gluegen.c" outputRootDir="${build_t.gen}" config="${test.junit.generation.dir}/test1p2-gluegen.cfg" literalInclude="${test.junit.generation.dir}" includeRefid="stub.includes.fileset.test" emitter="com.jogamp.gluegen.procaddress.ProcAddressEmitter" dumpCPP="false" debug="false"> <classpath refid="gluegen.classpath" /> </gluegen> </target> <target name="junit.test1.c.build" depends="junit.test1i.c.build, junit.test1p1.c.build, junit.test1p2.c.build" unless="build.javaonly" /> <!-- this is the test1 implementation --> <target name="junit.test1i.c.build"> <patternset id="junit.test1i.c.src.files"> <include name="src/junit/${test.junit.generation.rel}/test1.c"/> </patternset> <!-- Windows hacks ro make a proper DLL --> <linker id="linker.test1.dll.cfg.id" extends="${linker.cfg.id}"> <linkerarg value="-Wl,-soname=test1.dll" if="isMingW"/> <linkerarg value="-Wl,--output=test1.dll" if="isMingW"/> </linker> <c.build c.compiler.src.files="junit.test1i.c.src.files" output.lib.name="test1" compiler.cfg.id="${compiler.cfg.id}" linker.cfg.id="linker.test1.dll.cfg.id"/> </target> <!-- this is a fixed binding to the test1 implementation --> <target name="junit.test1p1.c.build"> <linker id="linker.test1.fixed.cfg.id" extends="${linker.cfg.id}"> <linkerarg value="-Wl,-soname=Bindingtest1p1.dll" if="isMingW"/> <linkerarg value="-Wl,--output=Bindingtest1p1.dll" if="isMingW"/> <syslibset dir="${build_t.lib}" libs="test1"/> </linker> <patternset id="junit.test1p1.c.src.files"> <include name="${build_t.gen.rootrel}/native/Bindingtest1p1Impl_JNI.c"/> <include name="${build_t.gen.rootrel}/native/TK_Engine_JNI.c"/> <include name="${build_t.gen.rootrel}/native/TK_Surface_JNI.c"/> </patternset> <c.build c.compiler.src.files="junit.test1p1.c.src.files" output.lib.name="Bindingtest1p1" compiler.cfg.id="${compiler.cfg.id}" linker.cfg.id="linker.test1.fixed.cfg.id"/> <antcall target="rename.dylib" inheritRefs="true"> <param name="src" value="${build_t.lib}/libBindingtest1p1.dylib" /> <param name="dest" value="${build_t.lib}/libBindingtest1p1.jnilib" /> </antcall> </target> <!-- this is a dynamic lookup binding to the test1 implementation --> <target name="junit.test1p2.c.build"> <linker id="linker.test1.runtime.cfg.id" extends="${linker.cfg.id}"> <linkerarg value="-Wl,-soname=Bindingtest1p2.dll" if="isMingW"/> <linkerarg value="-Wl,--output=Bindingtest1p2.dll" if="isMingW"/> </linker> <patternset id="junit.test1p2.c.src.files"> <include name="${build_t.gen.rootrel}/native/Bindingtest1p2Impl_JNI.c"/> <include name="${build_t.gen.rootrel}/native/TK_Engine_JNI.c"/> <include name="${build_t.gen.rootrel}/native/TK_Surface_JNI.c"/> </patternset> <c.build c.compiler.src.files="junit.test1p2.c.src.files" output.lib.name="Bindingtest1p2" compiler.cfg.id="${compiler.cfg.id}" linker.cfg.id="linker.test1.runtime.cfg.id"/> <antcall target="rename.dylib" inheritRefs="true"> <param name="src" value="${build_t.lib}/libBindingtest1p2.dylib" /> <param name="dest" value="${build_t.lib}/libBindingtest1p2.jnilib" /> </antcall> </target> <!-- junit.test2 --> <!-- updates / create the test results zip file --> <target name="test-zip-archive" depends="init"> <archive.7z destfile="${build}/${test.archive.name}.7z" basedir="${project.root}" includes="${rootrel.build}/test/results ${rootrel.build}/test/results-x64 ${rootrel.build}/test/results-x32" /> </target> </project>