com.jogamp.opengl.util.texture.awt
Class AWTTextureIO
java.lang.Object
com.jogamp.opengl.util.texture.TextureIO
com.jogamp.opengl.util.texture.awt.AWTTextureIO
public class AWTTextureIO
- extends TextureIO
Methods inherited from class com.jogamp.opengl.util.texture.TextureIO |
addTextureProvider, addTextureWriter, isTexRectEnabled, newTexture, newTexture, newTexture, newTexture, newTexture, newTexture, newTexture, newTextureData, newTextureData, newTextureData, newTextureData, newTextureData, newTextureData, setTexRectEnabled, write, write |
AWTTextureIO
public AWTTextureIO()
newTextureData
public static TextureData newTextureData(GLProfile glp,
BufferedImage image,
boolean mipmap)
- Creates a TextureData from the given BufferedImage. Does no
OpenGL work.
We assume a desktop GLProfile GL2GL3, otherwise use the other factory.
- Parameters:
glp
- the OpenGL Profile this texture data should be
created for.image
- the BufferedImage containing the texture datamipmap
- whether mipmaps should be produced for this
texture by autogenerating them
- Returns:
- the texture data from the image
- See Also:
newTextureData(GLProfile, BufferedImage, boolean)
newTextureData
public static TextureData newTextureData(GLProfile glp,
BufferedImage image,
int internalFormat,
int pixelFormat,
boolean mipmap)
throws IllegalArgumentException
- Creates a TextureData from the given BufferedImage, using the
specified OpenGL internal format and pixel format for the texture
which will eventually result. The internalFormat and pixelFormat
must be specified and may not be zero; to use default values, use
the variant of this method which does not take these
arguments. Does no OpenGL work.
- Parameters:
glp
- the OpenGL Profile this texture data should be
created for.image
- the BufferedImage containing the texture datainternalFormat
- the OpenGL internal format of the texture
which will eventually result from the TextureDatapixelFormat
- the OpenGL pixel format of the texture
which will eventually result from the TextureDatamipmap
- whether mipmaps should be produced for this
texture either by autogenerating them or
reading them from the file. Some file formats
support multiple mipmaps in a single file in
which case those mipmaps will be used rather
than generating them.
- Returns:
- the texture data from the image
- Throws:
IllegalArgumentException
- if either internalFormat or
pixelFormat was 0
newTexture
public static Texture newTexture(GLProfile glp,
BufferedImage image,
boolean mipmap)
throws GLException
- Creates an OpenGL texture object from the specified BufferedImage
using the current OpenGL context.
- Parameters:
glp
- the OpenGL Profile this texture data should be
created for.image
- the BufferedImage from which to read the texture datamipmap
- whether mipmaps should be produced for this
texture by autogenerating them
- Throws:
GLException
- if no OpenGL context is current or if an
OpenGL error occurred
Copyright 2010 JogAmp Community.