Class AWTTextureData
- java.lang.Object
-
- com.jogamp.opengl.util.texture.TextureData
-
- com.jogamp.opengl.util.texture.awt.AWTTextureData
-
public class AWTTextureData extends TextureData
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.jogamp.opengl.util.texture.TextureData
TextureData.ColorSpace, TextureData.Flusher
-
-
Constructor Summary
Constructors Constructor Description AWTTextureData(GLProfile glp, 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BuffergetBuffer()Returns the texture data, or null if it is specified as a set of mipmaps.GLPixelBuffer.GLPixelAttributesgetPixelAttributes()Returns the intended OpenGLGLPixelBuffer.GLPixelAttributesof the texture data, i.e.intgetPixelFormat()Returns the intended OpenGL pixel format of the texture data usingTextureData.getPixelAttributes().intgetPixelType()Returns the intended OpenGL pixel type of the texture data usingTextureData.getPixelAttributes().-
Methods inherited from class com.jogamp.opengl.util.texture.TextureData
destroy, flush, getAlignment, getBorder, getColorSpace, getEstimatedMemorySize, getGLProfile, getHeight, getInternalFormat, getMipmap, getMipmapData, getMustFlipVertically, getRowLength, getSourceImageType, getWidth, isDataCompressed, setAlignment, setBorder, setBuffer, setColorSpace, setHaveEXTABGR, setHaveGL12, setHeight, setInternalFormat, setIsDataCompressed, setMipmap, setMustFlipVertically, setPixelAttributes, setPixelFormat, setPixelType, setRowLength, setWidth, toString
-
-
-
-
Constructor Detail
-
AWTTextureData
public AWTTextureData(GLProfile glp, 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:
glp- the OpenGL Profile this texture data should be created for.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
-
-
Method Detail
-
getPixelAttributes
public GLPixelBuffer.GLPixelAttributes getPixelAttributes()
Description copied from class:TextureDataReturns the intended OpenGLGLPixelBuffer.GLPixelAttributesof the texture data, i.e. format and type.- Overrides:
getPixelAttributesin classTextureData
-
getPixelFormat
public int getPixelFormat()
Description copied from class:TextureDataReturns the intended OpenGL pixel format of the texture data usingTextureData.getPixelAttributes().- Overrides:
getPixelFormatin classTextureData
-
getPixelType
public int getPixelType()
Description copied from class:TextureDataReturns the intended OpenGL pixel type of the texture data usingTextureData.getPixelAttributes().- Overrides:
getPixelTypein classTextureData
-
getBuffer
public Buffer getBuffer()
Description copied from class:TextureDataReturns the texture data, or null if it is specified as a set of mipmaps.- Overrides:
getBufferin classTextureData
-
-