public class FacedCubemapData extends Object implements CubemapData
TextureData
per face.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
Pixmap s 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
Pixmap s 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
Pixmap s 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() . |
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)
Pixmap
s for the sides, does not generate mipmaps.public FacedCubemapData(Pixmap positiveX, Pixmap negativeX, Pixmap positiveY, Pixmap negativeY, Pixmap positiveZ, Pixmap negativeZ, boolean useMipMaps)
Pixmap
s for the sides, optionally generating mipmaps.public FacedCubemapData(int width, int height, int depth, Pixmap.Format format)
Pixmap
s 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 CubemapData
public 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.CubemapSide
file
- The texture FileHandle
public 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.CubemapSide
pixmap
- The Pixmap
public 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 CubemapData
public int getHeight()
getHeight
in interface CubemapData
public boolean isPrepared()
isPrepared
in interface CubemapData
public void prepare()
CubemapData
CubemapData.consumeCubemapData()
. This method can be called from a non OpenGL thread and
should thus not interact with OpenGL.prepare
in interface CubemapData
public void consumeCubemapData()
CubemapData
CubemapData.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
Copyright © 2018. All rights reserved.