public class FacedCubemapData extends java.lang.Object implements CubemapData
TextureData per face.| Modifier and Type | Field and Description |
|---|---|
protected TextureData[] |
data |
| Constructor and Description |
|---|
FacedCubemapData()
Construct an empty Cubemap.
|
FacedCubemapData(FileHandle positiveX,
FileHandle negativeX,
FileHandle positiveY,
FileHandle negativeY,
FileHandle positiveZ,
FileHandle negativeZ)
Construct a Cubemap with the specified texture files for the sides, optionally generating mipmaps.
|
FacedCubemapData(FileHandle positiveX,
FileHandle negativeX,
FileHandle positiveY,
FileHandle negativeY,
FileHandle positiveZ,
FileHandle negativeZ,
boolean useMipMaps)
Construct a Cubemap with the specified texture files for the sides, optionally generating mipmaps.
|
FacedCubemapData(int width,
int height,
int depth,
Pixmap.Format format)
Construct a Cubemap with
Pixmaps for each side of the specified size. |
FacedCubemapData(Pixmap positiveX,
Pixmap negativeX,
Pixmap positiveY,
Pixmap negativeY,
Pixmap positiveZ,
Pixmap negativeZ)
Construct a Cubemap with the specified
Pixmaps for the sides, does not generate mipmaps. |
FacedCubemapData(Pixmap positiveX,
Pixmap negativeX,
Pixmap positiveY,
Pixmap negativeY,
Pixmap positiveZ,
Pixmap negativeZ,
boolean useMipMaps)
Construct a Cubemap with the specified
Pixmaps for the sides, optionally generating mipmaps. |
FacedCubemapData(TextureData positiveX,
TextureData negativeX,
TextureData positiveY,
TextureData negativeY,
TextureData positiveZ,
TextureData negativeZ)
Construct a Cubemap with the specified
TextureData's for the sides |
| Modifier and Type | Method and Description |
|---|---|
void |
consumeCubemapData()
Uploads the pixel data for the 6 faces of the cube to the OpenGL ES texture.
|
int |
getHeight() |
TextureData |
getTextureData(Cubemap.CubemapSide side) |
int |
getWidth() |
boolean |
isComplete() |
boolean |
isManaged() |
boolean |
isPrepared() |
void |
load(Cubemap.CubemapSide side,
FileHandle file)
Loads the texture specified using the
FileHandle and sets it to specified side, overwriting any previous data set to
that side. |
void |
load(Cubemap.CubemapSide side,
Pixmap pixmap)
Sets the specified side of this cubemap to the specified
Pixmap, overwriting any previous data set to that side. |
void |
prepare()
Prepares the TextureData for a call to
CubemapData.consumeCubemapData(). |
protected final TextureData[] data
public FacedCubemapData()
public FacedCubemapData(FileHandle positiveX, FileHandle negativeX, FileHandle positiveY, FileHandle negativeY, FileHandle positiveZ, FileHandle negativeZ)
public FacedCubemapData(FileHandle positiveX, FileHandle negativeX, FileHandle positiveY, FileHandle negativeY, FileHandle positiveZ, FileHandle negativeZ, boolean useMipMaps)
public FacedCubemapData(Pixmap positiveX, Pixmap negativeX, Pixmap positiveY, Pixmap negativeY, Pixmap positiveZ, Pixmap negativeZ)
Pixmaps for the sides, does not generate mipmaps.public FacedCubemapData(Pixmap positiveX, Pixmap negativeX, Pixmap positiveY, Pixmap negativeY, Pixmap positiveZ, Pixmap negativeZ, boolean useMipMaps)
Pixmaps for the sides, optionally generating mipmaps.public FacedCubemapData(int width,
int height,
int depth,
Pixmap.Format format)
Pixmaps for each side of the specified size.public FacedCubemapData(TextureData positiveX, TextureData negativeX, TextureData positiveY, TextureData negativeY, TextureData positiveZ, TextureData negativeZ)
TextureData's for the sidespublic boolean isManaged()
isManaged in interface CubemapDatapublic void load(Cubemap.CubemapSide side, FileHandle file)
FileHandle and sets it to specified side, overwriting any previous data set to
that side. Note that you need to reload through Cubemap.load(CubemapData) any cubemap using this data for the change
to be taken in account.side - The Cubemap.CubemapSidefile - The texture FileHandlepublic void load(Cubemap.CubemapSide side, Pixmap pixmap)
Pixmap, overwriting any previous data set to that side.
Note that you need to reload through Cubemap.load(CubemapData) any cubemap using this data for the change to be
taken in account.side - The Cubemap.CubemapSidepixmap - The Pixmappublic boolean isComplete()
public TextureData getTextureData(Cubemap.CubemapSide side)
TextureData for the specified side, can be null if the cubemap is incomplete.public int getWidth()
getWidth in interface CubemapDatapublic int getHeight()
getHeight in interface CubemapDatapublic boolean isPrepared()
isPrepared in interface CubemapDatapublic void prepare()
CubemapDataCubemapData.consumeCubemapData(). This method can be called from a non OpenGL thread and
should thus not interact with OpenGL.prepare in interface CubemapDatapublic void consumeCubemapData()
CubemapDataCubemapData.prepare() must preceed a call to this method. Any internal data structures created in CubemapData.prepare()
should be disposed of here.consumeCubemapData in interface CubemapData