diff options
author | Sven Gothel <[email protected]> | 2011-09-14 09:50:36 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-09-14 09:50:36 +0200 |
commit | 430eff8c3ffab8c69c149ba1c633d2b03f2ef2d3 (patch) | |
tree | 1a4427c2bd70f98f271a7e41b550c590bf61e152 /src/jogl | |
parent | 3972522e561f3d47ce4b0abce0cfa428d97f11bd (diff) |
Minor edits: generics, test script
Diffstat (limited to 'src/jogl')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderCode.java | 15 |
1 files changed, 7 insertions, 8 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 12d80e42c..cc75b89c0 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderCode.java +++ b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderCode.java @@ -32,7 +32,6 @@ import com.jogamp.common.nio.Buffers; import com.jogamp.common.util.IOUtil; import javax.media.opengl.*; -import com.jogamp.opengl.util.*; import jogamp.opengl.Debug; import java.util.*; @@ -89,7 +88,7 @@ public class ShaderCode { id = getNextID(); } - public static ShaderCode create(GL2ES2 gl, int type, int number, Class context, String[] sourceFiles) { + public static ShaderCode create(GL2ES2 gl, int type, int number, Class<?> context, String[] sourceFiles) { if(!ShaderUtil.isShaderCompilerAvailable(gl)) return null; String[][] shaderSources = null; @@ -108,7 +107,7 @@ public class ShaderCode { return new ShaderCode(type, number, shaderSources); } - public static ShaderCode create(int type, int number, Class context, int binFormat, String binaryFile) { + public static ShaderCode create(int type, int number, Class<?> context, int binFormat, String binaryFile) { ByteBuffer shaderBinary = null; if(null!=binaryFile && 0<=binFormat) { shaderBinary = readShaderBinary(context, binaryFile); @@ -142,7 +141,7 @@ public class ShaderCode { } } - public static ShaderCode create(GL2ES2 gl, int type, int number, Class context, + public static ShaderCode create(GL2ES2 gl, int type, int number, Class<?> context, String srcRoot, String binRoot, String basename) { ShaderCode res = null; String srcFileName = null; @@ -284,7 +283,7 @@ public class ShaderCode { } } - private static int readShaderSource(Class context, URL url, StringBuffer result, int lineno) { + private static int readShaderSource(Class<?> context, URL url, StringBuffer result, int lineno) { try { if(DEBUG_CODE) { System.err.printf("%3d: // %s\n", lineno, url); @@ -324,7 +323,7 @@ public class ShaderCode { return lineno; } - public static void readShaderSource(Class context, URL url, StringBuffer result) { + public static void readShaderSource(Class<?> context, URL url, StringBuffer result) { if(DEBUG_CODE) { System.err.println(); System.err.println("// -----------------------------------------------------------"); @@ -336,7 +335,7 @@ public class ShaderCode { } } - public static String readShaderSource(Class context, String path) { + public static String readShaderSource(Class<?> context, String path) { URL url = IOUtil.getResource(context, path); if (url == null) { return null; @@ -346,7 +345,7 @@ public class ShaderCode { return result.toString(); } - public static ByteBuffer readShaderBinary(Class context, String path) { + public static ByteBuffer readShaderBinary(Class<?> context, String path) { try { URL url = IOUtil.getResource(context, path); if (url == null) { |