summaryrefslogtreecommitdiffstats
path: root/src/demos/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/demos/util')
-rwxr-xr-xsrc/demos/util/Cubemap.java12
-rw-r--r--src/demos/util/DurationTimer.java2
2 files changed, 7 insertions, 7 deletions
diff --git a/src/demos/util/Cubemap.java b/src/demos/util/Cubemap.java
index 9f31b9a..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;
@@ -62,21 +62,21 @@ public class Cubemap {
GL.GL_TEXTURE_CUBE_MAP_POSITIVE_Z,
GL.GL_TEXTURE_CUBE_MAP_NEGATIVE_Z };
- public static Texture loadFromStreams(ClassLoader scope,
+ public static Texture loadFromStreams(GL gl,
+ ClassLoader scope,
String basename,
- String suffix,
- boolean mipmapped) throws IOException, GLException {
+ String suffix, boolean mipmapped) throws IOException, GLException {
Texture cubemap = TextureIO.newTexture(GL.GL_TEXTURE_CUBE_MAP);
for (int i = 0; i < suffixes.length; i++) {
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);
}
- cubemap.updateImage(data, targets[i]);
+ cubemap.updateImage(gl, data, targets[i]);
}
return cubemap;
diff --git a/src/demos/util/DurationTimer.java b/src/demos/util/DurationTimer.java
index c0f88e7..18a7f40 100644
--- a/src/demos/util/DurationTimer.java
+++ b/src/demos/util/DurationTimer.java
@@ -58,7 +58,7 @@ public class DurationTimer {
accumulatedTime += (curTime - startTime);
}
- public long getDuration() {
+ public long getTotalFPSDuration() {
return accumulatedTime;
}