com.sun.opengl.util.texture.awt
Class AWTTextureData
java.lang.Object
com.sun.opengl.util.texture.TextureData
com.sun.opengl.util.texture.awt.AWTTextureData
public class AWTTextureData
- extends TextureData
Fields inherited from class com.sun.opengl.util.texture.TextureData |
alignment, buffer, estimatedMemorySize, haveEXTABGR, haveGL12, height, internalFormat, mipmap, mustFlipVertically, pixelFormat, pixelType, rowLength, width |
Constructor Summary |
AWTTextureData(int internalFormat,
int pixelFormat,
boolean mipmap,
BufferedImage image)
Constructs a new TextureData object with the specified parameters
and data contained in the given BufferedImage. |
Method Summary |
Buffer |
getBuffer()
Returns the texture data, or null if it is specified as a set of mipmaps. |
int |
getPixelFormat()
Returns the intended OpenGL pixel format of the texture data. |
int |
getPixelType()
Returns the intended OpenGL pixel type of the texture data. |
Methods inherited from class com.sun.opengl.util.texture.TextureData |
destroy, estimatedMemorySize, flush, getAlignment, getBorder, getEstimatedMemorySize, getHeight, getInternalFormat, getMipmap, getMipmapData, getMustFlipVertically, getRowLength, getWidth, isDataCompressed, setAlignment, setBorder, setBuffer, setHaveEXTABGR, setHaveGL12, setHeight, setInternalFormat, setIsDataCompressed, setMipmap, setMustFlipVertically, setPixelFormat, setPixelType, setRowLength, setWidth, toString |
AWTTextureData
public AWTTextureData(int internalFormat,
int pixelFormat,
boolean mipmap,
BufferedImage image)
- Constructs a new TextureData object with the specified parameters
and data contained in the given BufferedImage. The resulting
TextureData "wraps" the contents of the BufferedImage, so if a
modification is made to the BufferedImage between the time the
TextureData is constructed and when a Texture is made from the
TextureData, that modification will be visible in the resulting
Texture.
- Parameters:
internalFormat
- the OpenGL internal format for the
resulting texture; may be 0, in which case
it is inferred from the image's typepixelFormat
- the OpenGL internal format for the
resulting texture; may be 0, in which case
it is inferred from the image's type (note:
this argument is currently always ignored)mipmap
- indicates whether mipmaps should be
autogenerated (using GLU) for the resulting
textureimage
- the image containing the texture data
getPixelFormat
public int getPixelFormat()
- Returns the intended OpenGL pixel format of the texture data.
- Overrides:
getPixelFormat
in class TextureData
getPixelType
public int getPixelType()
- Returns the intended OpenGL pixel type of the texture data.
- Overrides:
getPixelType
in class TextureData
getBuffer
public Buffer getBuffer()
- Returns the texture data, or null if it is specified as a set of mipmaps.
- Overrides:
getBuffer
in class TextureData
Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.