|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TextureProvider
Plug-in interface to TextureIO to support reading OpenGL textures from new file formats. For all methods, either internalFormat or pixelFormat may be 0 in which case they must be inferred as e.g. RGB or RGBA depending on the file contents.
Method Summary | |
---|---|
TextureData |
newTextureData(File file,
int internalFormat,
int pixelFormat,
boolean mipmap,
String fileSuffix)
Produces a TextureData object from a file, or returns null if the file format was not supported by this TextureProvider. |
TextureData |
newTextureData(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. |
TextureData |
newTextureData(URL url,
int internalFormat,
int pixelFormat,
boolean mipmap,
String fileSuffix)
Produces a TextureData object from a URL, or returns null if the file format was not supported by this TextureProvider. |
Method Detail |
---|
TextureData newTextureData(File file, int internalFormat, int pixelFormat, boolean mipmap, String fileSuffix) throws IOException
file
- the file 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
IOException
- if an error occurred while reading the fileTextureData newTextureData(InputStream stream, int internalFormat, int pixelFormat, boolean mipmap, String fileSuffix) throws IOException
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
IOException
- if an error occurred while reading the streamTextureData newTextureData(URL url, int internalFormat, int pixelFormat, boolean mipmap, String fileSuffix) throws IOException
url
- the URL 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
IOException
- if an error occurred while reading the URL
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |