Package com.badlogic.gdx.graphics
Interface CubemapData
-
- All Known Implementing Classes:
FacedCubemapData
,KTXTextureData
public interface CubemapData
Used by aCubemap
to load the pixel data. The Cubemap will request the CubemapData to prepare itself throughprepare()
and upload its data usingconsumeCubemapData()
. These are the first methods to be called by Cubemap. After that the Cubemap will invoke the other methods to find out about the size of the image data, the format, whether the CubemapData is able to manage the pixel data if the OpenGL ES context is lost. Before a call to eitherconsumeCubemapData()
, Cubemap will bind the OpenGL ES texture. Look atKTXTextureData
for example implementation of this interface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
consumeCubemapData()
Uploads the pixel data for the 6 faces of the cube to the OpenGL ES texture.int
getHeight()
int
getWidth()
boolean
isManaged()
boolean
isPrepared()
void
prepare()
Prepares the TextureData for a call toconsumeCubemapData()
.
-
-
-
Method Detail
-
isPrepared
boolean isPrepared()
- Returns:
- whether the TextureData is prepared or not.
-
prepare
void prepare()
Prepares the TextureData for a call toconsumeCubemapData()
. This method can be called from a non OpenGL thread and should thus not interact with OpenGL.
-
consumeCubemapData
void consumeCubemapData()
-
getWidth
int getWidth()
- Returns:
- the width of the pixel data
-
getHeight
int getHeight()
- Returns:
- the height of the pixel data
-
isManaged
boolean isManaged()
- Returns:
- whether this implementation can cope with a EGL context loss.
-
-