|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.neovisionaries.android.opengl.Texture<Texture2D>
com.neovisionaries.android.opengl.Texture2D
public class Texture2D
OpenGL ES 2D texture.
Constructor Summary | |
---|---|
Texture2D()
A constructor to create a 2D texture (GL_TEXTURE_2D). |
Method Summary | |
---|---|
boolean |
isBound()
Check if this 2D texture is bound. |
Texture2D |
loadImage(Bitmap bitmap)
This method is an alias of loadImage (bitmap, 0). |
Texture2D |
loadImage(Bitmap bitmap,
int level)
Load an image. |
Methods inherited from class com.neovisionaries.android.opengl.Texture |
---|
bind, delete, generateMipmap, getId, getState, getType, getUnit, setMagFilter, setMinFilter, setUnit, setWrapS, setWrapT |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Texture2D() throws GLESException
super
(TextureType.TWO_D
) is called. After this constructor
returns, the state of this instance is CREATED
.
GLESException
- glGenTextures() failed.Texture.Texture(TextureType)
,
glGenTexturesMethod Detail |
---|
public boolean isBound()
This method returns true (1) if the current active texture
unit is the same as the one that this texture should be
bound to and (2) if the value returned from GLESState.getTextureBinding2D()
and the value returned
from Texture.getId()
are identical.
isBound
in class Texture<Texture2D>
GLESState.getActiveTexture()
,
GLESState.getTextureBinding2D()
public Texture2D loadImage(Bitmap bitmap, int level)
If this texture is not bound when this method
is called, bind()
is called first. Then,
GLUtils.texImage2D(GL_TEXTURE_2D, level, bitmap, 0)
is called.
bitmap
- Image to load.level
- Mipmap level.
IllegalArgumentException
- 'bitmap' is null or 'level' is less than 0.
IllegalStateException
- This texture has already been deleted.public Texture2D loadImage(Bitmap bitmap)
loadImage
(bitmap, 0).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |