diff options
author | Sven Gothel <[email protected]> | 2011-06-08 05:58:07 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-06-08 05:58:07 +0200 |
commit | 138ddda3f346db0f1d8b4bac1760d415e7dc3d70 (patch) | |
tree | d6b489428d56dce585273b179aacf8e042a8b2fc /src/jogl/classes/com/jogamp/opengl/util/glsl | |
parent | 24a117c1fb0af458f70932fa48b8052c16a4fa7f (diff) |
Locator moved to GlueGen's IOUtil (gluegen a87c56c95099de5b6cbc9bd8bf6f1924a3dd6387)
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/util/glsl')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderCode.java | 10 | ||||
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/util/glsl/sdk/CompileShader.java | 6 |
2 files changed, 9 insertions, 7 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 be3a1de73..12d80e42c 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderCode.java +++ b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderCode.java @@ -301,13 +301,13 @@ public class ShaderCode { URL nextURL = null; // Try relative path first - String next = Locator.getRelativeOf(url, includeFile); + String next = IOUtil.getRelativeOf(url, includeFile); if(null != next) { - nextURL = Locator.getResource(context, next); + nextURL = IOUtil.getResource(context, next); } if (nextURL == null) { // Try absolute path - nextURL = Locator.getResource(context, includeFile); + nextURL = IOUtil.getResource(context, includeFile); } if (nextURL == null) { // Fail @@ -337,7 +337,7 @@ public class ShaderCode { } public static String readShaderSource(Class context, String path) { - URL url = Locator.getResource(context, path); + URL url = IOUtil.getResource(context, path); if (url == null) { return null; } @@ -348,7 +348,7 @@ public class ShaderCode { public static ByteBuffer readShaderBinary(Class context, String path) { try { - URL url = Locator.getResource(context, path); + URL url = IOUtil.getResource(context, path); if (url == null) { return null; } diff --git a/src/jogl/classes/com/jogamp/opengl/util/glsl/sdk/CompileShader.java b/src/jogl/classes/com/jogamp/opengl/util/glsl/sdk/CompileShader.java index a0eed50ea..1f79890dc 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/glsl/sdk/CompileShader.java +++ b/src/jogl/classes/com/jogamp/opengl/util/glsl/sdk/CompileShader.java @@ -1,5 +1,7 @@ package com.jogamp.opengl.util.glsl.sdk; +import com.jogamp.common.util.IOUtil; + import javax.media.opengl.*; import com.jogamp.opengl.util.*; import com.jogamp.opengl.util.glsl.*; @@ -51,7 +53,7 @@ public abstract class CompileShader { String justName = basename(resourceName); outName = justName.substring(0, justName.length() - suffixLen) + ShaderCode.getFileSuffix(true, type); - URL resourceURL = Locator.getResource(null, resourceName); + URL resourceURL = IOUtil.getResource(null, resourceName); String dirName = dirname(resourceURL.getPath()); outName = dirName + File.separator + "bin" + File.separator + @@ -63,7 +65,7 @@ public abstract class CompileShader { public void processOneShader(String resourceName, String outName, int type) throws IOException, UnsupportedEncodingException, InterruptedException { - URL resourceURL = Locator.getResource(null, resourceName); + URL resourceURL = IOUtil.getResource(null, resourceName); String dirName = dirname(resourceURL.getPath()); String shader = ShaderCode.readShaderSource(null, resourceName); |