Java Code Examples for android.opengl.GLES30#glDeleteTextures()

The following examples show how to use android.opengl.GLES30#glDeleteTextures() . 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: GLSurface.java    From libcommon with Apache License 2.0 6 votes vote down vote up
/**
 * オフスクリーンフレームバッファを破棄
 */
@Override
protected void releaseFrameBuffer() {
	final int[] names = new int[1];
	// デプスバッファがある時はデプスバッファを破棄
	if (mDepthBufferObj >= 0) {
		names[0] = mDepthBufferObj;
		GLES30.glDeleteRenderbuffers(1, names, 0);
		mDepthBufferObj = -1;
	}
	// オフスクリーンのカラーバッファ用のテクスチャを破棄
	if (mFBOTexId >= 0) {
		names[0] = mFBOTexId;
		GLES30.glDeleteTextures(1, names, 0);
		mFBOTexId = -1;
	}
	// オフスクリーンのフレームバッファーオブジェクトを破棄
	if (mFrameBufferObj >= 0) {
		names[0] = mFrameBufferObj;
		GLES30.glDeleteFramebuffers(1, names, 0);
		mFrameBufferObj = -1;
	}
}
 
Example 2
Source File: GLHelper.java    From libcommon with Apache License 2.0 4 votes vote down vote up
/**
 * delete specific texture
 */
public static void deleteTex(final int hTex) {
	if (DEBUG) Log.v(TAG, "deleteTex:");
	final int[] tex = new int[] {hTex};
	GLES30.glDeleteTextures(1, tex, 0);
}
 
Example 3
Source File: GLHelper.java    From libcommon with Apache License 2.0 4 votes vote down vote up
/**
 * delete specific texture
 */
public static void deleteTex(@NonNull final int[] tex) {
	if (DEBUG) Log.v(TAG, "deleteTex:");
	GLES30.glDeleteTextures(tex.length, tex, 0);
}