|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.newdawn.slick.opengl.TextureImpl org.newdawn.slick.opengl.DeferredTexture
public class DeferredTexture
A texture proxy that can be used to load a texture at a later date while still allowing elements to reference it
Field Summary |
---|
Fields inherited from class org.newdawn.slick.opengl.TextureImpl |
---|
GL |
Constructor Summary | |
---|---|
DeferredTexture(java.io.InputStream in,
java.lang.String resourceName,
boolean flipped,
int filter,
int[] trans)
Create a new deferred texture |
Method Summary | |
---|---|
void |
bind()
Bind the GL context to a texture |
java.lang.String |
getDescription()
Get a description of the resource to be loaded |
float |
getHeight()
Get the height of the physical texture |
int |
getImageHeight()
Get the height of the original image |
int |
getImageWidth()
Get the width of the original image |
byte[] |
getTextureData()
Get the pixel data from the card for this texture |
int |
getTextureHeight()
Get the height of the actual texture |
int |
getTextureID()
Get the OpenGL texture ID for this texture |
java.lang.String |
getTextureRef()
Get the reference from which this texture was loaded |
int |
getTextureWidth()
Get the width of the actual texture |
float |
getWidth()
Get the width of the physical texture |
boolean |
hasAlpha()
Check if the texture has alpha |
void |
load()
Load the actual resource |
void |
release()
Destroy the texture reference |
void |
setAlpha(boolean alpha)
If this texture has alpha |
void |
setHeight(int height)
Set the height of the image |
void |
setTextureFilter(int textureFilter)
Apply a given texture filter to the texture |
void |
setTextureHeight(int texHeight)
Set the height of this texture |
void |
setTextureID(int textureID)
Set the OpenGL texture ID for this texture |
void |
setTextureWidth(int texWidth)
Set the width of this texture |
void |
setWidth(int width)
Set the width of the image |
Methods inherited from class org.newdawn.slick.opengl.TextureImpl |
---|
bindNone, createIntBuffer, getLastBind, reload, setCacheName, setTextureData, unbind |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DeferredTexture(java.io.InputStream in, java.lang.String resourceName, boolean flipped, int filter, int[] trans)
in
- The input stream from which to read the textureresourceName
- The name to give the resourceflipped
- True if the image should be flippedfilter
- The filter to applytrans
- The colour to defined as transparentMethod Detail |
---|
public void load() throws java.io.IOException
DeferredResource
load
in interface DeferredResource
java.io.IOException
- Indicates a failure to load the resourceDeferredResource.load()
public void bind()
Texture
bind
in interface Texture
bind
in class TextureImpl
TextureImpl.bind()
public float getHeight()
Texture
getHeight
in interface Texture
getHeight
in class TextureImpl
TextureImpl.getHeight()
public int getImageHeight()
Texture
getImageHeight
in interface Texture
getImageHeight
in class TextureImpl
TextureImpl.getImageHeight()
public int getImageWidth()
Texture
getImageWidth
in interface Texture
getImageWidth
in class TextureImpl
TextureImpl.getImageWidth()
public int getTextureHeight()
Texture
getTextureHeight
in interface Texture
getTextureHeight
in class TextureImpl
TextureImpl.getTextureHeight()
public int getTextureID()
Texture
getTextureID
in interface Texture
getTextureID
in class TextureImpl
TextureImpl.getTextureID()
public java.lang.String getTextureRef()
Texture
getTextureRef
in interface Texture
getTextureRef
in class TextureImpl
TextureImpl.getTextureRef()
public int getTextureWidth()
Texture
getTextureWidth
in interface Texture
getTextureWidth
in class TextureImpl
TextureImpl.getTextureWidth()
public float getWidth()
Texture
getWidth
in interface Texture
getWidth
in class TextureImpl
TextureImpl.getWidth()
public void release()
Texture
release
in interface Texture
release
in class TextureImpl
TextureImpl.release()
public void setAlpha(boolean alpha)
TextureImpl
setAlpha
in class TextureImpl
alpha
- True, If this texture has alphaTextureImpl.setAlpha(boolean)
public void setHeight(int height)
TextureImpl
setHeight
in class TextureImpl
height
- The height of the imageTextureImpl.setHeight(int)
public void setTextureHeight(int texHeight)
TextureImpl
setTextureHeight
in class TextureImpl
texHeight
- The height of the textureTextureImpl.setTextureHeight(int)
public void setTextureID(int textureID)
TextureImpl
setTextureID
in class TextureImpl
textureID
- The OpenGL texture IDTextureImpl.setTextureID(int)
public void setTextureWidth(int texWidth)
TextureImpl
setTextureWidth
in class TextureImpl
texWidth
- The width of the textureTextureImpl.setTextureWidth(int)
public void setWidth(int width)
TextureImpl
setWidth
in class TextureImpl
width
- The width of the imageTextureImpl.setWidth(int)
public byte[] getTextureData()
Texture
getTextureData
in interface Texture
getTextureData
in class TextureImpl
TextureImpl.getTextureData()
public java.lang.String getDescription()
DeferredResource
getDescription
in interface DeferredResource
DeferredResource.getDescription()
public boolean hasAlpha()
Texture
hasAlpha
in interface Texture
hasAlpha
in class TextureImpl
Texture.hasAlpha()
public void setTextureFilter(int textureFilter)
Texture
setTextureFilter
in interface Texture
setTextureFilter
in class TextureImpl
textureFilter
- The texture filter to apply (GL_LINEAR, GL_NEAREST, etc..)Texture.setTextureFilter(int)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |