Package gaiasky.util.gdx.graphics
Class TextureExt
java.lang.Object
com.badlogic.gdx.graphics.GLTexture
com.badlogic.gdx.graphics.Texture
gaiasky.util.gdx.graphics.TextureExt
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable
public class TextureExt
extends com.badlogic.gdx.graphics.Texture
-
Nested Class Summary
Nested classes/interfaces inherited from class com.badlogic.gdx.graphics.Texture
com.badlogic.gdx.graphics.Texture.TextureFilter, com.badlogic.gdx.graphics.Texture.TextureWrap
-
Field Summary
Fields inherited from class com.badlogic.gdx.graphics.GLTexture
anisotropicFilterLevel, glHandle, glTarget, magFilter, minFilter, uWrap, vWrap
-
Constructor Summary
ConstructorDescriptionTextureExt
(com.badlogic.gdx.graphics.TextureData data) TextureExt
(String internalPath) -
Method Summary
Methods inherited from class com.badlogic.gdx.graphics.Texture
clearAllTextures, dispose, draw, getDepth, getHeight, getManagedStatus, getNumManagedTextures, getTextureData, getWidth, invalidateAllTextures, isManaged, load, reload, setAssetManager, toString
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
-
Constructor Details
-
TextureExt
public TextureExt(com.badlogic.gdx.graphics.TextureData data) -
TextureExt
-
-
Method Details
-
draw
public void draw(com.badlogic.gdx.graphics.Pixmap pixmap, int x, int y, int mipmapLevel) Draws the givenPixmap
to the texture mipmap level at position x, y. No clipping is performed so you have to make sure that you draw only inside the texture region.- Parameters:
pixmap
- The Pixmap.x
- The x coordinate in pixels.y
- The y coordinate in pixels.mipmapLevel
- The mipmap level to draw.
-
draw
public void draw(Buffer buffer, int x, int y, int width, int height, int mipmapLevel, int glFormat, int glType) Draws the givenBuffer
to the texture mipmap level at position x, y. No clipping is performed, so you have to make sure that you draw only inside the texture region.- Parameters:
buffer
- The buffer.x
- The x coordinate in pixels.y
- The y coordinate in pixels.mipmapLevel
- The mipmap level to draw.glFormat
- Specifies the format of the pixel data. The following symbolic values are accepted: GL_RED, GL_RG, GL_RGB, GL_BGR, GL_RGBA, GL_BGRA, GL_DEPTH_COMPONENT, and GL_STENCIL_INDEX.glType
- Specifies the data type of the pixel data. The following symbolic values are accepted: GL_UNSIGNED_BYTE, GL_BYTE, GL_UNSIGNED_SHORT, GL_SHORT, GL_UNSIGNED_INT, GL_INT, GL_FLOAT, GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV, GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_5_6_5_REV, GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV, GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV, GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV, GL_UNSIGNED_INT_10_10_10_2, and GL_UNSIGNED_INT_2_10_10_10_REV.
-