|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthmi.environment.GLTextureWow
public class GLTextureWow
2D texture. For non power of two images there are three options: hardware, stretch, and pad. For pad, non power of two images are mapped to the bottom left corner of a power of two texture. Use getMaxS() and getMaxT() to get the float coordinates of the topright corner (bottom left corner is 0,0). For stretch, non power of two images are stretched to fit the power of two texture. user getSStretch() and getTStretch() to get the stretch factors. Supported (set through mipmaps and smooth flags): GL_TEXTURE_MIN_FILTER, GL_TEXTURE_MAG_FILTER, GL_TEXTURE_MIN_LOD, GL_TEXTURE_MAX_LOD, GL_TEXTURE_BASE_LEVEL, GL_TEXTURE_MAX_LEVEL, Set through wrap: GL_TEXTURE_WRAP_S, GL_TEXTURE_WRAP_T N/A: GL_TEXTURE_WRAP_R not supported: GL_TEXTURE_PRIORITY
| Field Summary | |
|---|---|
int |
height
|
boolean |
mipmap
|
int |
name
GL name of this texture |
static int |
NPOT_HARDWARE
|
static int |
NPOT_PAD
|
static int |
NPOT_STRETCH
|
private static int |
npotmode
|
int |
origheight
|
int |
origwidth
|
boolean |
smooth
|
int |
totalheight
|
int |
totalwidth
|
int |
width
|
| Constructor Summary | |
|---|---|
GLTextureWow(GLRenderContext glc,
int[] data,
int width,
int height,
boolean mipmap,
boolean smooth)
Define empty texture; wrap is initially enabled for s and t. |
|
GLTextureWow(GLRenderContext glc,
int width,
int height,
boolean mipmap,
boolean smooth)
Define empty texture; wrap is initially enabled for s and t. |
|
| Method Summary | |
|---|---|
void |
bind(GLRenderContext glc)
BindTexture |
void |
copyDepthBuffer(GLRenderContext glc,
int x,
int y)
copies part of depth buffer into texture (glCopyTexImage) |
void |
copyRenderBuffer(GLRenderContext glc,
int x,
int y)
copies part of render buffer into texture (glCopyTexImage) |
void |
disable(GLRenderContext glc)
Disable GL_TEXTURE |
static void |
disableTex(GLRenderContext glc)
Disable GL_TEXTURE |
void |
enable(GLRenderContext glc)
Enable GL_TEXTURE |
static void |
enableTex(GLRenderContext glc)
Enable GL_TEXTURE |
void |
free(GLRenderContext glc)
|
int |
getHeight()
|
float |
getMaxS()
|
float |
getMaxT()
|
float |
getSStretch()
|
float |
getTStretch()
|
int |
getWidth()
|
(package private) void |
initialise(GLRenderContext glc,
int[] data,
int width,
int height,
boolean mipmap,
boolean smooth)
Define empty texture; wrap is initially enabled for s and t. |
static void |
setNPOTMode(int mode)
|
static int |
smallestPowerOfTwo(int i)
|
void |
writeToGL(GLRenderContext glc)
Write glTextureParameters to GL state. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public int name
public boolean mipmap
public boolean smooth
public int origwidth
public int origheight
public int width
public int height
public int totalwidth
public int totalheight
public static final int NPOT_HARDWARE
public static final int NPOT_STRETCH
public static final int NPOT_PAD
private static int npotmode
| Constructor Detail |
|---|
public GLTextureWow(GLRenderContext glc,
int width,
int height,
boolean mipmap,
boolean smooth)
public GLTextureWow(GLRenderContext glc,
int[] data,
int width,
int height,
boolean mipmap,
boolean smooth)
data - width*height*4 bytes (RGBA values)| Method Detail |
|---|
public static int smallestPowerOfTwo(int i)
public static void setNPOTMode(int mode)
void initialise(GLRenderContext glc,
int[] data,
int width,
int height,
boolean mipmap,
boolean smooth)
public void free(GLRenderContext glc)
public void copyDepthBuffer(GLRenderContext glc,
int x,
int y)
public void copyRenderBuffer(GLRenderContext glc,
int x,
int y)
public void enable(GLRenderContext glc)
public static void enableTex(GLRenderContext glc)
public void disable(GLRenderContext glc)
public static void disableTex(GLRenderContext glc)
public void bind(GLRenderContext glc)
public float getMaxS()
public float getMaxT()
public float getSStretch()
public float getTStretch()
public int getWidth()
public int getHeight()
public void writeToGL(GLRenderContext glc)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||