Top Fields Constructors Methods
com.jogamp.opengl.util.texture.awt

public Class AWTTextureIO

extends TextureIO
Class Inheritance
Imports
java.awt.image.*, com.jogamp.opengl.*, com.jogamp.opengl.util.texture.*

Field Summary

Inherited from com.jogamp.opengl.util.texture.TextureIO:
DDSGIFJPGPAMPNGPPMSGISGI_RGBTGATIFF

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static Texture
newTexture(final GLProfile
the OpenGL Profile this texture data should be created for.
glp
,
final BufferedImage
the BufferedImage from which to read the texture data
image
,
final boolean
whether mipmaps should be produced for this texture by autogenerating them
mipmap
)

Creates an OpenGL texture object from the specified BufferedImage using the current OpenGL context.

public static TextureData

Returns:

the texture data from the image
newTextureData
(final GLProfile
the OpenGL Profile this texture data should be created for.
glp
,
final BufferedImage
the BufferedImage containing the texture data
image
,
final boolean
whether mipmaps should be produced for this texture by autogenerating them
mipmap
)

Creates a TextureData from the given BufferedImage.

public static TextureData

Returns:

the texture data from the image
newTextureData
(final GLProfile
the OpenGL Profile this texture data should be created for.
glp
,
final BufferedImage
the BufferedImage containing the texture data
image
,
final int
the OpenGL internal format of the texture which will eventually result from the TextureData
internalFormat
,
final int
the OpenGL pixel format of the texture which will eventually result from the TextureData
pixelFormat
,
final boolean
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.
mipmap
)

Creates a TextureData from the given BufferedImage, using the specified OpenGL internal format and pixel format for the texture which will eventually result.

private static TextureData
newTextureDataImpl(final GLProfile glp, final BufferedImage image, final int internalFormat, final int pixelFormat, final boolean mipmap)

Inherited from com.jogamp.opengl.util.texture.TextureIO:
addTextureProvideraddTextureWriterisTexRectEnablednewTexturenewTexturenewTexturenewTexturenewTexturenewTexturenewTextureDatanewTextureDatanewTextureDatanewTextureDatanewTextureDatanewTextureDatasetTexRectEnabledwritewrite

Constructor Detail

AWTTextureIOback to summary
public AWTTextureIO()

Method Detail

newTextureback to summary
public static Texture newTexture(final GLProfile glp, final BufferedImage image, final boolean mipmap) throws GLException

Creates an OpenGL texture object from the specified BufferedImage using the current OpenGL context.

Parameters
glp:GLProfile

the OpenGL Profile this texture data should be created for.

image:BufferedImage

the BufferedImage from which to read the texture data

mipmap:boolean

whether mipmaps should be produced for this texture by autogenerating them

Exceptions
GLException:
if no OpenGL context is current or if an OpenGL error occurred
newTextureDataback to summary
public static TextureData newTextureData(final GLProfile glp, final BufferedImage image, final 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:GLProfile

the OpenGL Profile this texture data should be created for.

image:BufferedImage

the BufferedImage containing the texture data

mipmap:boolean

whether mipmaps should be produced for this texture by autogenerating them

Returns:TextureData

the texture data from the image

See Also
newTextureData(GLProfile, BufferedImage, boolean)
newTextureDataback to summary
public static TextureData newTextureData(final GLProfile glp, final BufferedImage image, final int internalFormat, final int pixelFormat, final 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:GLProfile

the OpenGL Profile this texture data should be created for.

image:BufferedImage

the BufferedImage containing the texture data

internalFormat:int

the OpenGL internal format of the texture which will eventually result from the TextureData

pixelFormat:int

the OpenGL pixel format of the texture which will eventually result from the TextureData

mipmap:boolean

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:TextureData

the texture data from the image

Exceptions
IllegalArgumentException:
if either internalFormat or pixelFormat was 0
newTextureDataImplback to summary
private static TextureData newTextureDataImpl(final GLProfile glp, final BufferedImage image, final int internalFormat, final int pixelFormat, final boolean mipmap)