|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.lee.mugen.core.renderer.lwjgl.Texture
public class Texture
A texture to be bound within JOGL. This object is responsible for keeping track of a given OpenGL texture and for calculating the texturing mapping coordinates of the full image. Since textures need to be powers of 2 the actual texture may be considerably bigged that the source image and hence the texture mapping coordinates need to be adjusted to matchup drawing the sprite against the texture.
| Constructor Summary | |
|---|---|
Texture(int target,
int textureID)
Create a new texture |
|
| Method Summary | |
|---|---|
void |
bind()
Bind the specified GL context to a texture |
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 |
int |
getTexHeight()
|
int |
getTextureID()
|
int |
getTexWidth()
|
float |
getWidth()
Get the width of the physical texture |
void |
setHeight(int height)
Set the height of the image |
void |
setTexHeight(int texHeight)
|
void |
setTextureHeight(int texHeight)
Set the height of this texture |
void |
setTextureWidth(int texWidth)
Set the width of this texture |
void |
setTexWidth(int texWidth)
|
void |
setWidth(int width)
Set the width of the image |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Texture(int target,
int textureID)
target - The GL targettextureID - The GL texture ID| Method Detail |
|---|
public void bind()
gl - The GL context to bind topublic void setHeight(int height)
height - The height of the imagepublic void setWidth(int width)
width - The width of the imagepublic int getImageHeight()
public int getImageWidth()
public float getHeight()
public float getWidth()
public void setTextureHeight(int texHeight)
texHeight - The height of the texturepublic void setTextureWidth(int texWidth)
texWidth - The width of the texturepublic int getTextureID()
public int getTexWidth()
public void setTexWidth(int texWidth)
public int getTexHeight()
public void setTexHeight(int texHeight)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||