|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.opengl.util.TGAWriter
Utility class which helps take fast screenshots of OpenGL rendering
results into Targa-format files. Used by the Screenshot
class; can also be used
in conjunction with the TileRenderer
class.
Constructor Summary | |
TGAWriter()
Constructor for the TGAWriter. |
Method Summary | |
void |
close()
|
ByteBuffer |
getImageData()
Returns the ByteBuffer corresponding to the data for the image. |
void |
open(File file,
int width,
int height,
boolean alpha)
Opens the specified Targa file for writing, overwriting any existing file, and sets up the header of the file expecting the data to be filled in before closing it. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TGAWriter()
Method Detail |
public void open(File file, int width, int height, boolean alpha) throws IOException
file
- the file to write containing the screenshotwidth
- the width of the current drawableheight
- the height of the current drawablealpha
- whether the alpha channel should be saved. If true,
requires GL_EXT_abgr extension to be present.
IOException
- if an I/O error occurred while writing the
filepublic ByteBuffer getImageData()
public void close() throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |