|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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 transparent| Method Detail |
|---|
public void load()
throws java.io.IOException
DeferredResource
load in interface DeferredResourcejava.io.IOException - Indicates a failure to load the resourceDeferredResource.load()public void bind()
Texture
bind in interface Texturebind in class TextureImplTextureImpl.bind()public float getHeight()
Texture
getHeight in interface TexturegetHeight in class TextureImplTextureImpl.getHeight()public int getImageHeight()
Texture
getImageHeight in interface TexturegetImageHeight in class TextureImplTextureImpl.getImageHeight()public int getImageWidth()
Texture
getImageWidth in interface TexturegetImageWidth in class TextureImplTextureImpl.getImageWidth()public int getTextureHeight()
Texture
getTextureHeight in interface TexturegetTextureHeight in class TextureImplTextureImpl.getTextureHeight()public int getTextureID()
Texture
getTextureID in interface TexturegetTextureID in class TextureImplTextureImpl.getTextureID()public java.lang.String getTextureRef()
Texture
getTextureRef in interface TexturegetTextureRef in class TextureImplTextureImpl.getTextureRef()public int getTextureWidth()
Texture
getTextureWidth in interface TexturegetTextureWidth in class TextureImplTextureImpl.getTextureWidth()public float getWidth()
Texture
getWidth in interface TexturegetWidth in class TextureImplTextureImpl.getWidth()public void release()
Texture
release in interface Texturerelease in class TextureImplTextureImpl.release()public void setAlpha(boolean alpha)
TextureImpl
setAlpha in class TextureImplalpha - True, If this texture has alphaTextureImpl.setAlpha(boolean)public void setHeight(int height)
TextureImpl
setHeight in class TextureImplheight - The height of the imageTextureImpl.setHeight(int)public void setTextureHeight(int texHeight)
TextureImpl
setTextureHeight in class TextureImpltexHeight - The height of the textureTextureImpl.setTextureHeight(int)public void setTextureID(int textureID)
TextureImpl
setTextureID in class TextureImpltextureID - The OpenGL texture IDTextureImpl.setTextureID(int)public void setTextureWidth(int texWidth)
TextureImpl
setTextureWidth in class TextureImpltexWidth - The width of the textureTextureImpl.setTextureWidth(int)public void setWidth(int width)
TextureImpl
setWidth in class TextureImplwidth - The width of the imageTextureImpl.setWidth(int)public byte[] getTextureData()
Texture
getTextureData in interface TexturegetTextureData in class TextureImplTextureImpl.getTextureData()public java.lang.String getDescription()
DeferredResource
getDescription in interface DeferredResourceDeferredResource.getDescription()public boolean hasAlpha()
Texture
hasAlpha in interface TexturehasAlpha in class TextureImplTexture.hasAlpha()public void setTextureFilter(int textureFilter)
Texture
setTextureFilter in interface TexturesetTextureFilter in class TextureImpltextureFilter - 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 | |||||||||