summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsrc/demos/es2/perftst/PerfTextLoad.java4
-rwxr-xr-xsrc/demos/misc/TiledRendering.java4
-rw-r--r--src/demos/proceduralTexturePhysics/Water.java8
-rwxr-xr-xsrc/demos/texture/TextureConvert.java4
-rwxr-xr-xsrc/demos/util/Cubemap.java4
5 files changed, 13 insertions, 11 deletions
diff --git a/src/demos/es2/perftst/PerfTextLoad.java b/src/demos/es2/perftst/PerfTextLoad.java
index e0a6e2e..670f4c9 100755
--- a/src/demos/es2/perftst/PerfTextLoad.java
+++ b/src/demos/es2/perftst/PerfTextLoad.java
@@ -1,5 +1,7 @@
package demos.es2.perftst;
+import com.jogamp.common.util.IOUtil;
+
import java.nio.*;
import java.io.*;
import java.net.*;
@@ -36,7 +38,7 @@ public class PerfTextLoad extends PerfModule {
try {
for(int i=0; i<numObjs; i++) {
textName = "data/"+textBaseName+"."+(i+1)+".tga";
- URL urlText = Locator.getResource(Perftst.class, textName);
+ URL urlText = IOUtil.getResource(Perftst.class, textName);
if(urlText==null) {
throw new RuntimeException("couldn't fetch "+textName);
}
diff --git a/src/demos/misc/TiledRendering.java b/src/demos/misc/TiledRendering.java
index e814610..86de0bb 100755
--- a/src/demos/misc/TiledRendering.java
+++ b/src/demos/misc/TiledRendering.java
@@ -1,6 +1,6 @@
package demos.misc;
-import com.jogamp.opengl.util.FileUtil;
+import com.jogamp.common.util.IOUtil;
import com.jogamp.opengl.util.TGAWriter;
import com.jogamp.opengl.util.awt.ImageUtil;
import com.jogamp.opengl.util.gl2.TileRenderer;
@@ -106,7 +106,7 @@ public class TiledRendering {
tga.close();
} else {
ImageUtil.flipImageVertically(img);
- if (!ImageIO.write(img, FileUtil.getFileSuffix(file), file)) {
+ if (!ImageIO.write(img, IOUtil.getFileSuffix(file), file)) {
System.err.println("Error writing file using ImageIO (unsupported file format?)");
}
}
diff --git a/src/demos/proceduralTexturePhysics/Water.java b/src/demos/proceduralTexturePhysics/Water.java
index 80de446..d62379b 100644
--- a/src/demos/proceduralTexturePhysics/Water.java
+++ b/src/demos/proceduralTexturePhysics/Water.java
@@ -33,7 +33,7 @@
package demos.proceduralTexturePhysics;
-import com.jogamp.opengl.util.FileUtil;
+import com.jogamp.common.util.IOUtil;
import com.jogamp.opengl.util.texture.Texture;
import com.jogamp.opengl.util.texture.TextureData;
import com.jogamp.opengl.util.texture.TextureIO;
@@ -498,7 +498,7 @@ public class Water {
initialMapData = TextureIO.newTextureData(glp,
getClass().getClassLoader().getResourceAsStream(initialMapFilename),
false,
- FileUtil.getFileSuffix(initialMapFilename));
+ IOUtil.getFileSuffix(initialMapFilename));
} catch (IOException e) {
throw new GLException(e);
}
@@ -1038,9 +1038,9 @@ public class Water {
initialMapTex = TextureIO.newTexture(initialMapData);
spinTex = TextureIO.newTexture(getClass().getClassLoader().getResourceAsStream(spinFilename), false,
- FileUtil.getFileSuffix(spinFilename));
+ IOUtil.getFileSuffix(spinFilename));
dropletTex = TextureIO.newTexture(getClass().getClassLoader().getResourceAsStream(dropletFilename), false,
- FileUtil.getFileSuffix(dropletFilename));
+ IOUtil.getFileSuffix(dropletFilename));
// load the cubemap texture
cubemap = Cubemap.loadFromStreams(gl,
diff --git a/src/demos/texture/TextureConvert.java b/src/demos/texture/TextureConvert.java
index 7967416..cd198e0 100755
--- a/src/demos/texture/TextureConvert.java
+++ b/src/demos/texture/TextureConvert.java
@@ -39,7 +39,7 @@
package demos.texture;
-import com.jogamp.opengl.util.FileUtil;
+import com.jogamp.common.util.IOUtil;
import com.jogamp.opengl.util.texture.Texture;
import com.jogamp.opengl.util.texture.TextureData;
import com.jogamp.opengl.util.texture.TextureIO;
@@ -84,7 +84,7 @@ public class TextureConvert {
GL gl = pbuffer.getGL();
boolean attemptCompression = false;
- if (TextureIO.DDS.equals(FileUtil.getFileSuffix(outputFile))) {
+ if (TextureIO.DDS.equals(IOUtil.getFileSuffix(outputFile))) {
if (gl.isExtensionAvailable("GL_EXT_texture_compression_s3tc") ||
gl.isExtensionAvailable("GL_NV_texture_compression_vtc")) {
attemptCompression = true;
diff --git a/src/demos/util/Cubemap.java b/src/demos/util/Cubemap.java
index 5ceab82..abca371 100755
--- a/src/demos/util/Cubemap.java
+++ b/src/demos/util/Cubemap.java
@@ -39,7 +39,7 @@
package demos.util;
-import com.jogamp.opengl.util.FileUtil;
+import com.jogamp.common.util.IOUtil;
import com.jogamp.opengl.util.texture.Texture;
import com.jogamp.opengl.util.texture.TextureData;
import com.jogamp.opengl.util.texture.TextureIO;
@@ -72,7 +72,7 @@ public class Cubemap {
String resourceName = basename + suffixes[i] + "." + suffix;
TextureData data = TextureIO.newTextureData(GLContext.getCurrentGL().getGLProfile(), scope.getResourceAsStream(resourceName),
mipmapped,
- FileUtil.getFileSuffix(resourceName));
+ IOUtil.getFileSuffix(resourceName));
if (data == null) {
throw new IOException("Unable to load texture " + resourceName);
}