Java Code Examples for android.opengl.GLES20#glIsTexture()

The following examples show how to use android.opengl.GLES20#glIsTexture() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BitmapTexture.java    From PhotoMovie with Apache License 2.0 5 votes vote down vote up
@Override
public void recycle() {
    mIsRecycled = true;
    if(mRecycleDirectly) {
        if (mId != NO_TEXTURE && GLES20.glIsTexture(mId)) {
            GLES20.glDeleteTextures(1, new int[]{mId}, 0);
            mId = NO_TEXTURE;
        }
    }
    super.recycle();
}
 
Example 2
Source File: FboTexture.java    From PhotoMovie with Apache License 2.0 5 votes vote down vote up
public void release() {
    if (mId != 0 && GLES20.glIsTexture(mId)) {
        GLES20.glDeleteTextures(1, new int[]{mId}, 0);
    }
    if (mRenderBuffer != 0 && GLES20.glIsRenderbuffer(mRenderBuffer)) {
        GLES20.glDeleteRenderbuffers(1, new int[]{mRenderBuffer}, 0);
    }
    if (mFrameBuffer != 0 && GLES20.glIsFramebuffer(mFrameBuffer)) {
        GLES20.glDeleteFramebuffers(1, new int[]{mFrameBuffer}, 0);
        mFrameBuffer = 0;
    }
}
 
Example 3
Source File: FileTextureSource.java    From Tanks with MIT License 5 votes vote down vote up
@Override
public void release(Texture texture)
{
  int handle = texture.getHandle();
  if (GLES20.glIsTexture(handle))
    GLES20.glDeleteTextures(1, new int[] { handle }, 0);
}
 
Example 4
Source File: Texture.java    From Tanks with MIT License 5 votes vote down vote up
public void validate()
{
  if (!GameContext.debuggable)
    return;

  if (!GLES20.glIsTexture(handle))
    throw new IllegalStateException("Texture handle deprecated");
}
 
Example 5
Source File: BasicTexture.java    From PhotoMovie with Apache License 2.0 4 votes vote down vote up
public boolean isLoaded() {
    //调用GLSurfaceView的onPause()会导致textureId失效,所以要加一个检查
    return mState == STATE_LOADED && GLES20.glIsTexture(mId);
}
 
Example 6
Source File: AndroidGL.java    From trekarta with GNU General Public License v3.0 4 votes vote down vote up
@Override
public boolean isTexture(int texture) {
    return GLES20.glIsTexture(texture);
}
 
Example 7
Source File: GLState.java    From tilt-game-android with MIT License 4 votes vote down vote up
public boolean isTexture(final int pHardwareTextureID) {
	return GLES20.glIsTexture(pHardwareTextureID);
}
 
Example 8
Source File: GLState.java    From 30-android-libraries-in-30-days with Apache License 2.0 4 votes vote down vote up
public boolean isTexture(final int pHardwareTextureID) {
	return GLES20.glIsTexture(pHardwareTextureID);
}