summaryrefslogtreecommitdiffstats
path: root/src/demos/readbuffer/Surface2File.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2009-10-04 17:11:11 -0700
committerSven Gothel <[email protected]>2009-10-04 17:11:11 -0700
commit7997824464198164a74f4d20620d2f432578024c (patch)
treedd8c288d66d279f10f9edb4d35d8abeb03ccf164 /src/demos/readbuffer/Surface2File.java
parent4b9a72c24bb97ed81c79c3931d4ffb5fa53d9978 (diff)
ReadBuffer Demos: Use NetPbmTextureWriter
Diffstat (limited to 'src/demos/readbuffer/Surface2File.java')
-rwxr-xr-xsrc/demos/readbuffer/Surface2File.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/demos/readbuffer/Surface2File.java b/src/demos/readbuffer/Surface2File.java
index 12a5256..cc76f28 100755
--- a/src/demos/readbuffer/Surface2File.java
+++ b/src/demos/readbuffer/Surface2File.java
@@ -39,7 +39,7 @@ import javax.media.opengl.*;
import com.sun.opengl.util.texture.TextureData;
import com.sun.opengl.util.BufferUtil;
-import com.sun.opengl.util.texture.spi.awt.IIOTextureWriter;
+import com.sun.opengl.util.texture.spi.NetPbmTextureWriter;
import java.io.File;
import java.io.IOException;
@@ -48,7 +48,7 @@ import javax.media.nativewindow.*;
public class Surface2File implements SurfaceUpdatedListener {
ReadBufferUtil readBufferUtil = new ReadBufferUtil();
- IIOTextureWriter textureWriter = new IIOTextureWriter();
+ NetPbmTextureWriter textureWriter = new NetPbmTextureWriter(6);
int shotNum=0;
public void dispose() {
@@ -70,7 +70,7 @@ public class Surface2File implements SurfaceUpdatedListener {
if(!readBufferUtil.isValid()) return;
try {
- textureWriter.write(new File(basename+"-"+shotNum+".jpg"), readBufferUtil.getTextureData());
+ textureWriter.write(new File(basename+"-"+shotNum+"."+textureWriter.getSuffix()), readBufferUtil.getTextureData());
shotNum++;
} catch (IOException ioe) { ioe.printStackTrace(); }
readBufferUtil.rewindPixelBuffer();