|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gljava.opengl.Texture
public class Texture
An OpenGL Texture
| Field Summary | |
|---|---|
(package private) int |
height
|
(package private) float |
heightRatio
|
(package private) int |
target
The GL target type |
(package private) int |
texHeight
|
(package private) int |
textureID
The GL texture ID |
(package private) int |
texWidth
|
(package private) int |
width
|
(package private) float |
widthRatio
|
| Constructor Summary | |
|---|---|
Texture(int target,
int textureID)
Create a new texture |
|
| Method Summary | |
|---|---|
void |
bind(GL gl)
Bind the specified GL context to a texture |
private void |
calculateHeightRatio()
Set the height of the texture. |
private void |
calculateWidthRatio()
Set the width of the 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 |
float |
getWidth()
Get the width of the physical texture |
void |
setHeight(int height)
Set the height of the image |
void |
setTextureHeight(int texHeight)
Set the height of 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 java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
int target
int textureID
int width
int height
int texWidth
int texHeight
float widthRatio
float heightRatio
| Constructor Detail |
|---|
public Texture(int target,
int textureID)
target - The GL targettextureID - The GL texture ID| Method Detail |
|---|
public void bind(GL gl)
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 textureprivate void calculateHeightRatio()
private void calculateWidthRatio()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||