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

public Class IIOTextureProvider

extends Object
implements TextureProvider
Class Inheritance
All Implemented Interfaces
com.jogamp.opengl.util.texture.spi.TextureProvider
Imports
java.awt.image.*, java.io.*, java.net.*, javax.imageio.*, com.jogamp.opengl.GLProfile, jogamp.opengl.Debug, com.jogamp.opengl.util.texture.*, com.jogamp.opengl.util.texture.awt.*, com.jogamp.opengl.util.texture.spi.*

Field Summary

Modifier and TypeField and Description
private static final boolean

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public TextureData
newTextureData(final GLProfile
the OpenGL Profile this texture data should be created for.
glp
,
final File
the file from which to read the texture data
file
,
final int
the OpenGL internal format to be used for the texture, or 0 if it should be inferred from the file's contents
internalFormat
,
final int
the OpenGL pixel format to be used for the texture, or 0 if it should be inferred from the file's contents
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
,
final String
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
fileSuffix
)

Implements com.jogamp.opengl.util.texture.spi.TextureProvider.newTextureData.

Produces a TextureData object from a file, or returns null if the file format was not supported by this TextureProvider.
public TextureData
newTextureData(final GLProfile
the OpenGL Profile this texture data should be created for.
glp
,
final InputStream
the stream from which to read the texture data
stream
,
final int
the OpenGL internal format to be used for the texture, or 0 if it should be inferred from the file's contents
internalFormat
,
final int
the OpenGL pixel format to be used for the texture, or 0 if it should be inferred from the file's contents
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
,
final String
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
fileSuffix
)

Implements com.jogamp.opengl.util.texture.spi.TextureProvider.newTextureData.

Produces a TextureData object from a stream, or returns null if the file format was not supported by this TextureProvider.
public TextureData
newTextureData(final GLProfile
the OpenGL Profile this texture data should be created for.
glp
,
final URL
the URL from which to read the texture data
url
,
final int
the OpenGL internal format to be used for the texture, or 0 if it should be inferred from the file's contents
internalFormat
,
final int
the OpenGL pixel format to be used for the texture, or 0 if it should be inferred from the file's contents
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
,
final String
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
fileSuffix
)

Implements com.jogamp.opengl.util.texture.spi.TextureProvider.newTextureData.

Produces a TextureData object from a URL, or returns null if the file format was not supported by this TextureProvider.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DEBUGback to summary
private static final boolean DEBUG

Constructor Detail

IIOTextureProviderback to summary
public IIOTextureProvider()

Method Detail

newTextureDataback to summary
public TextureData newTextureData(final GLProfile glp, final File file, final int internalFormat, final int pixelFormat, final boolean mipmap, final String fileSuffix) throws IOException

Implements com.jogamp.opengl.util.texture.spi.TextureProvider.newTextureData.

Doc from com.jogamp.opengl.util.texture.spi.TextureProvider.newTextureData.

Produces a TextureData object from a file, 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.

Parameters
glp:GLProfile

the OpenGL Profile this texture data should be created for.

file:File

the file from which to read the texture data

internalFormat:int

the OpenGL internal format to be used for the texture, or 0 if it should be inferred from the file's contents

pixelFormat:int

the OpenGL pixel format to be used for the texture, or 0 if it should be inferred from the file's contents

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.

fileSuffix:String

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

Annotations
@Override
Exceptions
IOException:
if an error occurred while reading the file
newTextureDataback to summary
public TextureData newTextureData(final GLProfile glp, final InputStream stream, final int internalFormat, final int pixelFormat, final boolean mipmap, final String fileSuffix) throws IOException

Implements com.jogamp.opengl.util.texture.spi.TextureProvider.newTextureData.

Doc from com.jogamp.opengl.util.texture.spi.TextureProvider.newTextureData.

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.

Parameters
glp:GLProfile

the OpenGL Profile this texture data should be created for.

stream:InputStream

the stream from which to read the texture data

internalFormat:int

the OpenGL internal format to be used for the texture, or 0 if it should be inferred from the file's contents

pixelFormat:int

the OpenGL pixel format to be used for the texture, or 0 if it should be inferred from the file's contents

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.

fileSuffix:String

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

Annotations
@Override
Exceptions
IOException:
if an error occurred while reading the stream
newTextureDataback to summary
public TextureData newTextureData(final GLProfile glp, final URL url, final int internalFormat, final int pixelFormat, final boolean mipmap, final String fileSuffix) throws IOException

Implements com.jogamp.opengl.util.texture.spi.TextureProvider.newTextureData.

Doc from com.jogamp.opengl.util.texture.spi.TextureProvider.newTextureData.

Produces a TextureData object from a URL, 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.

Parameters
glp:GLProfile

the OpenGL Profile this texture data should be created for.

url:URL

the URL from which to read the texture data

internalFormat:int

the OpenGL internal format to be used for the texture, or 0 if it should be inferred from the file's contents

pixelFormat:int

the OpenGL pixel format to be used for the texture, or 0 if it should be inferred from the file's contents

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.

fileSuffix:String

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

Annotations
@Override
Exceptions
IOException:
if an error occurred while reading the URL