| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthmi.graphics.opengl.GLTexture
public class GLTexture
A wrapper for OpenGL texture objects, in the form of an GLRenderObject.
| Field Summary | |
|---|---|
private  float | 
anisotropy
 | 
private  int | 
format
 | 
private  int | 
genMipMap
 | 
private  int | 
glTextureUnit
 | 
private  boolean | 
hasAlpha
 | 
private  int | 
height
 | 
private  Buffer | 
imageBuffer
 | 
private  String | 
imageFile
 | 
private  int | 
internalFormat
 | 
private  int | 
magnificationFilter
 | 
static float | 
max_anisotropy
 | 
private  int | 
minificationFilter
 | 
(package private) static int | 
NOBORDER
 | 
private  int | 
textureId
 | 
private  int | 
textureUnit
 | 
private  int | 
type
 | 
private  int | 
width
 | 
private  int | 
wrap_S
 | 
private  int | 
wrap_T
 | 
(package private) static int | 
ZEROLEVEL
 | 
| Constructor Summary | |
|---|---|
GLTexture()
Default constructor  | 
|
GLTexture(int width,
          int height,
          int format,
          int type,
          boolean hasAlpha,
          Buffer image,
          String imageFile)
Creates a new GLTexture object with specified texture parameters The imageFile name is optional, but still useful for debugging purposes.  | 
|
| Method Summary | |
|---|---|
 int | 
getFormat()
 | 
 int | 
getHeight()
 | 
 int | 
getId()
Returns the OpenGL texture id.  | 
 Buffer | 
getImageBuffer()
 | 
 String | 
getImageFileName()
returns the image file name  | 
 int | 
getType()
 | 
 int | 
getWidth()
 | 
 void | 
glInit(GLRenderContext gl)
The OpenGL initialization.  | 
 void | 
glRender(GLRenderContext gl)
The OpenGL rendering.  | 
 boolean | 
hasAlpha()
 | 
 void | 
setAnisotropy(float anisotropy)
Sets the anisotropy valeu.  | 
 void | 
setFormat(int format)
 | 
 void | 
setGenerateMipMap(boolean generateMipMap)
Sets the mipmap generate mode.  | 
 void | 
setHeight(int height)
 | 
 void | 
setImageBuffer(Buffer buf)
 | 
 void | 
setImageFileName(String imageFile)
Sets the (optional) image file name, for debugging purposes  | 
 void | 
setMagnificationFilter(int magnificationFilter)
Sets the magnification filter.  | 
 void | 
setMinificationFilter(int minificationFilter)
Sets the minification filter.  | 
 void | 
setTextureUnit(int tu)
Sets the texture unit to be used for this texture.  | 
 void | 
setWidth(int width)
 | 
 void | 
setWrap_S(int wrapMode)
Sets the wrap mode for the S direction.  | 
 void | 
setWrap_T(int wrapMode)
Sets the wrap mode for the T direction.  | 
 String | 
toString()
 | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
|---|
private int textureId
private int textureUnit
private int glTextureUnit
private int minificationFilter
private int magnificationFilter
private float anisotropy
private int wrap_S
private int wrap_T
private int genMipMap
private int width
private int height
private int format
private int type
private boolean hasAlpha
private Buffer imageBuffer
private int internalFormat
private String imageFile
static final int ZEROLEVEL
static final int NOBORDER
public static float max_anisotropy
| Constructor Detail | 
|---|
public GLTexture()
public GLTexture(int width,
                 int height,
                 int format,
                 int type,
                 boolean hasAlpha,
                 Buffer image,
                 String imageFile)
| Method Detail | 
|---|
public void setImageFileName(String imageFile)
public String getImageFileName()
public String toString()
toString in class Objectpublic int getWidth()
public int getHeight()
public int getFormat()
public int getType()
public boolean hasAlpha()
public Buffer getImageBuffer()
public void setFormat(int format)
public void setWidth(int width)
public void setHeight(int height)
public void setImageBuffer(Buffer buf)
public void setMinificationFilter(int minificationFilter)
public void setMagnificationFilter(int magnificationFilter)
public void setAnisotropy(float anisotropy)
public void setWrap_S(int wrapMode)
public void setWrap_T(int wrapMode)
public void setGenerateMipMap(boolean generateMipMap)
public void setTextureUnit(int tu)
public int getId()
public void glInit(GLRenderContext gl)
glInit in interface GLRenderObjectpublic final void glRender(GLRenderContext gl)
glRender in interface GLRenderObject
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||