29package com.jogamp.opengl.test.junit.jogl.offscreen;
31import java.io.IOException;
32import com.jogamp.opengl.*;
44 super.dispose(drawable);
48 void copyTextureData2File() throws IOException {
49 if (!readBufferUtil.
isValid()) {
53 final File file = File.createTempFile(
"shot" + shotNum +
"-",
".png");
54 readBufferUtil.
write(file);
55 System.out.println(
"Wrote: " + file.getAbsolutePath() +
", ...");
61 super.display(drawable);
63 copyTextureData2File();
64 }
catch (
final IOException ex) {
65 throw new RuntimeException(
"can not read buffer to file", ex);
void dispose(final GLAutoDrawable drawable)
Notifies the listener to perform the release of all OpenGL resources per GLContext,...
void display(final GLAutoDrawable drawable)
Called by the drawable to initiate OpenGL rendering by the client.
ReadBuffer2File(final GLDrawable externalRead)
void write(final File dest)
Write the TextureData filled by readPixels(GLAutoDrawable, boolean) to file.
A higher-level abstraction than GLDrawable which supplies an event based mechanism (GLEventListener) ...
An abstraction for an OpenGL rendering target.