Class IIOTextureProvider
- java.lang.Object
-
- com.jogamp.opengl.util.texture.spi.awt.IIOTextureProvider
-
- All Implemented Interfaces:
TextureProvider
public class IIOTextureProvider extends Object implements TextureProvider
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.jogamp.opengl.util.texture.spi.TextureProvider
TextureProvider.SupportsImageTypes
-
-
Constructor Summary
Constructors Constructor Description IIOTextureProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImageType[]
getImageTypes()
Returns the known supportedImageType
s, ornull
if unknown.TextureData
newTextureData(GLProfile glp, InputStream stream, int internalFormat, int pixelFormat, boolean mipmap, String fileSuffix)
Produces a TextureData object from a stream, or returns null if the file format was not supported by this TextureProvider.
-
-
-
Method Detail
-
getImageTypes
public final ImageType[] getImageTypes()
Description copied from interface:TextureProvider
Returns the known supportedImageType
s, ornull
if unknown.Use case: Mapping of
ImageType
s toTextureProvider
.- Specified by:
getImageTypes
in interfaceTextureProvider
-
newTextureData
public TextureData newTextureData(GLProfile glp, InputStream stream, int internalFormat, int pixelFormat, boolean mipmap, String fileSuffix) throws IOException
Description copied from interface:TextureProvider
Produces a TextureData object from a stream, or returns null if the file format was not supported by this TextureProvider. Does not do any OpenGL-related work. The resulting TextureData can be converted into an OpenGL texture in a later step.- Specified by:
newTextureData
in interfaceTextureProvider
- Parameters:
glp
- the OpenGL Profile this texture data should be created for.stream
- the stream from which to read the texture datainternalFormat
- the OpenGL internal format to be used for the texture, or 0 if it should be inferred from the file's contentspixelFormat
- the OpenGL pixel format to be used for the texture, or 0 if it should be inferred from the file's contentsmipmap
- 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.fileSuffix
- the file suffix to be used as a hint to the provider to more quickly decide whether it can handle the file, or null if the provider should infer the type from the file's contents- Throws:
IOException
- if an error occurred while reading the stream
-
-