diff options
author | Sven Gothel <[email protected]> | 2015-10-03 05:07:46 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2015-10-03 05:07:46 +0200 |
commit | 731c473740e3e7ccd26ecda7ea0200382795c3a6 (patch) | |
tree | 7a363f30e85affaaea0d588abbc6087b3b582d28 /src/jogl/classes/com/jogamp/opengl/util/glsl/sdk | |
parent | 670df25aae92079945a83401db9722d543730193 (diff) |
Bug 1237: Adopt GlueGen's clarification of IOUtil.getResource(..), commit d78bb1be0a6290cb94918b21865a023c01825048
- Skip relative lookup for IOUtil.ClassResources using 'asset' only (from JAR file)
- Tested w/ jar file and build-dir, see scripts/tests.sh 'USE_BUILDDIR'
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/util/glsl/sdk')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/util/glsl/sdk/CompileShader.java | 4 |
1 files changed, 2 insertions, 2 deletions
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 f5dec1cab..376afb8ce 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 @@ -52,7 +52,7 @@ public abstract class CompileShader { final String justName = basename(resourceName); outName = justName.substring(0, justName.length() - suffixLen) + ShaderCode.getFileSuffix(true, type); - final URL resourceURL = IOUtil.getResource(null, resourceName).getURL(); + final URL resourceURL = IOUtil.getResource(resourceName, this.getClass().getClassLoader(), null).getURL(); final String dirName = dirname(resourceURL.getPath()); outName = dirName + File.separator + "bin" + File.separator + @@ -64,7 +64,7 @@ public abstract class CompileShader { public void processOneShader(final String resourceName, final String outName, final int type) throws IOException, UnsupportedEncodingException, InterruptedException { - final URL resourceURL = IOUtil.getResource(null, resourceName).getURL(); + final URL resourceURL = IOUtil.getResource(resourceName, this.getClass().getClassLoader(), null).getURL(); final String dirName = dirname(resourceURL.getPath()); final CharSequence shader = ShaderCode.readShaderSource(null, resourceName, false); |