Class OwnCubemap
java.lang.Object
com.badlogic.gdx.graphics.GLTexture
gaiasky.util.gdx.OwnCubemap
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable
public class OwnCubemap
extends com.badlogic.gdx.graphics.GLTexture
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnum to identify each side of a Cubemap -
Field Summary
FieldsFields inherited from class com.badlogic.gdx.graphics.GLTexture
anisotropicFilterLevel, glHandle, glTarget, magFilter, minFilter, uWrap, vWrap -
Constructor Summary
ConstructorsConstructorDescriptionOwnCubemap(int width, int height, int depth, com.badlogic.gdx.graphics.Pixmap.Format format) Construct a Cubemap withPixmaps for each side of the specified size.OwnCubemap(com.badlogic.gdx.files.FileHandle positiveX, com.badlogic.gdx.files.FileHandle negativeX, com.badlogic.gdx.files.FileHandle positiveY, com.badlogic.gdx.files.FileHandle negativeY, com.badlogic.gdx.files.FileHandle positiveZ, com.badlogic.gdx.files.FileHandle negativeZ) Construct a Cubemap with the specified texture files for the sides, does not generate mipmaps.OwnCubemap(com.badlogic.gdx.files.FileHandle positiveX, com.badlogic.gdx.files.FileHandle negativeX, com.badlogic.gdx.files.FileHandle positiveY, com.badlogic.gdx.files.FileHandle negativeY, com.badlogic.gdx.files.FileHandle positiveZ, com.badlogic.gdx.files.FileHandle negativeZ, boolean useMipMaps) Construct a Cubemap with the specified texture files for the sides, optionally generating mipmaps.OwnCubemap(com.badlogic.gdx.graphics.CubemapData data) Construct a Cubemap based on the given CubemapData.OwnCubemap(com.badlogic.gdx.graphics.CubemapData data, com.badlogic.gdx.graphics.Texture.TextureFilter minFilter, com.badlogic.gdx.graphics.Texture.TextureFilter magFilter) OwnCubemap(com.badlogic.gdx.graphics.Pixmap positiveX, com.badlogic.gdx.graphics.Pixmap negativeX, com.badlogic.gdx.graphics.Pixmap positiveY, com.badlogic.gdx.graphics.Pixmap negativeY, com.badlogic.gdx.graphics.Pixmap positiveZ, com.badlogic.gdx.graphics.Pixmap negativeZ) Construct a Cubemap with the specifiedPixmaps for the sides, does not generate mipmaps.OwnCubemap(com.badlogic.gdx.graphics.Pixmap positiveX, com.badlogic.gdx.graphics.Pixmap negativeX, com.badlogic.gdx.graphics.Pixmap positiveY, com.badlogic.gdx.graphics.Pixmap negativeY, com.badlogic.gdx.graphics.Pixmap positiveZ, com.badlogic.gdx.graphics.Pixmap negativeZ, boolean useMipMaps) Construct a Cubemap with the specifiedPixmaps for the sides, optionally generating mipmaps.OwnCubemap(com.badlogic.gdx.graphics.TextureData positiveX, com.badlogic.gdx.graphics.TextureData negativeX, com.badlogic.gdx.graphics.TextureData positiveY, com.badlogic.gdx.graphics.TextureData negativeY, com.badlogic.gdx.graphics.TextureData positiveZ, com.badlogic.gdx.graphics.TextureData negativeZ) Construct a Cubemap with the specifiedTextureData's for the sidesOwnCubemap(com.badlogic.gdx.graphics.TextureData positiveX, com.badlogic.gdx.graphics.TextureData negativeX, com.badlogic.gdx.graphics.TextureData positiveY, com.badlogic.gdx.graphics.TextureData negativeY, com.badlogic.gdx.graphics.TextureData positiveZ, com.badlogic.gdx.graphics.TextureData negativeZ, com.badlogic.gdx.graphics.Texture.TextureFilter minFilter, com.badlogic.gdx.graphics.Texture.TextureFilter magFilter) -
Method Summary
Modifier and TypeMethodDescriptionstatic voidclearAllCubemaps(com.badlogic.gdx.Application app) Clears all managed cubemaps.voiddispose()Disposes all resources associated with the cubemapcom.badlogic.gdx.graphics.CubemapDataintgetDepth()intstatic Stringstatic intintgetWidth()static voidinvalidateAllCubemaps(com.badlogic.gdx.Application app) Invalidate all managed cubemaps.booleanvoidload(com.badlogic.gdx.graphics.CubemapData data) Sets the sides of this cubemap to the specifiedCubemapData.voidload(com.badlogic.gdx.graphics.CubemapData data, com.badlogic.gdx.graphics.Texture.TextureFilter minFilter, com.badlogic.gdx.graphics.Texture.TextureFilter magFilter) protected voidreload()static voidsetAssetManager(com.badlogic.gdx.assets.AssetManager manager) Sets theAssetManager.Methods inherited from class com.badlogic.gdx.graphics.GLTexture
bind, bind, delete, getAnisotropicFilter, getMagFilter, getMaxAnisotropicFilterLevel, getMinFilter, getTextureObjectHandle, getUWrap, getVWrap, setAnisotropicFilter, setFilter, setWrap, unsafeSetAnisotropicFilter, unsafeSetAnisotropicFilter, unsafeSetFilter, unsafeSetFilter, unsafeSetWrap, unsafeSetWrap, uploadImageData, uploadImageData
-
Field Details
-
data
protected com.badlogic.gdx.graphics.CubemapData data
-
-
Constructor Details
-
OwnCubemap
public OwnCubemap(com.badlogic.gdx.graphics.CubemapData data) Construct a Cubemap based on the given CubemapData. -
OwnCubemap
public OwnCubemap(com.badlogic.gdx.graphics.CubemapData data, com.badlogic.gdx.graphics.Texture.TextureFilter minFilter, com.badlogic.gdx.graphics.Texture.TextureFilter magFilter) -
OwnCubemap
public OwnCubemap(com.badlogic.gdx.files.FileHandle positiveX, com.badlogic.gdx.files.FileHandle negativeX, com.badlogic.gdx.files.FileHandle positiveY, com.badlogic.gdx.files.FileHandle negativeY, com.badlogic.gdx.files.FileHandle positiveZ, com.badlogic.gdx.files.FileHandle negativeZ) Construct a Cubemap with the specified texture files for the sides, does not generate mipmaps. -
OwnCubemap
public OwnCubemap(com.badlogic.gdx.files.FileHandle positiveX, com.badlogic.gdx.files.FileHandle negativeX, com.badlogic.gdx.files.FileHandle positiveY, com.badlogic.gdx.files.FileHandle negativeY, com.badlogic.gdx.files.FileHandle positiveZ, com.badlogic.gdx.files.FileHandle negativeZ, boolean useMipMaps) Construct a Cubemap with the specified texture files for the sides, optionally generating mipmaps. -
OwnCubemap
public OwnCubemap(com.badlogic.gdx.graphics.Pixmap positiveX, com.badlogic.gdx.graphics.Pixmap negativeX, com.badlogic.gdx.graphics.Pixmap positiveY, com.badlogic.gdx.graphics.Pixmap negativeY, com.badlogic.gdx.graphics.Pixmap positiveZ, com.badlogic.gdx.graphics.Pixmap negativeZ) Construct a Cubemap with the specifiedPixmaps for the sides, does not generate mipmaps. -
OwnCubemap
public OwnCubemap(com.badlogic.gdx.graphics.Pixmap positiveX, com.badlogic.gdx.graphics.Pixmap negativeX, com.badlogic.gdx.graphics.Pixmap positiveY, com.badlogic.gdx.graphics.Pixmap negativeY, com.badlogic.gdx.graphics.Pixmap positiveZ, com.badlogic.gdx.graphics.Pixmap negativeZ, boolean useMipMaps) Construct a Cubemap with the specifiedPixmaps for the sides, optionally generating mipmaps. -
OwnCubemap
public OwnCubemap(int width, int height, int depth, com.badlogic.gdx.graphics.Pixmap.Format format) Construct a Cubemap withPixmaps for each side of the specified size. -
OwnCubemap
public OwnCubemap(com.badlogic.gdx.graphics.TextureData positiveX, com.badlogic.gdx.graphics.TextureData negativeX, com.badlogic.gdx.graphics.TextureData positiveY, com.badlogic.gdx.graphics.TextureData negativeY, com.badlogic.gdx.graphics.TextureData positiveZ, com.badlogic.gdx.graphics.TextureData negativeZ) Construct a Cubemap with the specifiedTextureData's for the sides -
OwnCubemap
public OwnCubemap(com.badlogic.gdx.graphics.TextureData positiveX, com.badlogic.gdx.graphics.TextureData negativeX, com.badlogic.gdx.graphics.TextureData positiveY, com.badlogic.gdx.graphics.TextureData negativeY, com.badlogic.gdx.graphics.TextureData positiveZ, com.badlogic.gdx.graphics.TextureData negativeZ, com.badlogic.gdx.graphics.Texture.TextureFilter minFilter, com.badlogic.gdx.graphics.Texture.TextureFilter magFilter)
-
-
Method Details
-
clearAllCubemaps
public static void clearAllCubemaps(com.badlogic.gdx.Application app) Clears all managed cubemaps. This is an internal method. Do not use it! -
invalidateAllCubemaps
public static void invalidateAllCubemaps(com.badlogic.gdx.Application app) Invalidate all managed cubemaps. This is an internal method. Do not use it! -
setAssetManager
public static void setAssetManager(com.badlogic.gdx.assets.AssetManager manager) Sets theAssetManager. When the context is lost, cubemaps managed by the asset manager are reloaded by the manager on a separate thread (provided that a suitableAssetLoaderis registered with the manager). Cubemaps not managed by the AssetManager are reloaded via the usual means on the rendering thread.- Parameters:
manager- the asset manager.
-
getManagedStatus
-
getNumManagedCubemaps
public static int getNumManagedCubemaps()- Returns:
- the number of managed cubemaps currently loaded
-
load
public void load(com.badlogic.gdx.graphics.CubemapData data) Sets the sides of this cubemap to the specifiedCubemapData. -
load
public void load(com.badlogic.gdx.graphics.CubemapData data, com.badlogic.gdx.graphics.Texture.TextureFilter minFilter, com.badlogic.gdx.graphics.Texture.TextureFilter magFilter) -
getCubemapData
public com.badlogic.gdx.graphics.CubemapData getCubemapData() -
isManaged
public boolean isManaged()- Specified by:
isManagedin classcom.badlogic.gdx.graphics.GLTexture
-
reload
protected void reload()- Specified by:
reloadin classcom.badlogic.gdx.graphics.GLTexture
-
getWidth
public int getWidth()- Specified by:
getWidthin classcom.badlogic.gdx.graphics.GLTexture
-
getHeight
public int getHeight()- Specified by:
getHeightin classcom.badlogic.gdx.graphics.GLTexture
-
getDepth
public int getDepth()- Specified by:
getDepthin classcom.badlogic.gdx.graphics.GLTexture
-
dispose
public void dispose()Disposes all resources associated with the cubemap- Specified by:
disposein interfacecom.badlogic.gdx.utils.Disposable- Overrides:
disposein classcom.badlogic.gdx.graphics.GLTexture
-