本文整理匯總了Java中android.opengl.GLES20.glDeleteTextures方法的典型用法代碼示例。如果您正苦於以下問題:Java GLES20.glDeleteTextures方法的具體用法?Java GLES20.glDeleteTextures怎麽用?Java GLES20.glDeleteTextures使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類android.opengl.GLES20
的用法示例。
在下文中一共展示了GLES20.glDeleteTextures方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: release
import android.opengl.GLES20; //導入方法依賴的package包/類
private void release() {
if (handler.getLooper().getThread() != Thread.currentThread()) {
throw new IllegalStateException("Wrong thread.");
}
if (isTextureInUse || !isQuitting) {
throw new IllegalStateException("Unexpected release.");
}
if (yuvConverter != null) {
yuvConverter.release();
}
GLES20.glDeleteTextures(1, new int[] {oesTextureId}, 0);
surfaceTexture.release();
eglBase.release();
handler.getLooper().quit();
}
示例2: destroy
import android.opengl.GLES20; //導入方法依賴的package包/類
@Override
public void destroy() {
super.destroy();
if (mSurfaceTexture != null) {
mSurfaceTexture.release();
mSurfaceTexture = null;
}
if (mTextureIn != 0) {
int[] tex = new int[1];
tex[0] = mTextureIn;
GLES20.glDeleteTextures(1, tex, 0);
mTextureIn = 0;
}
}
示例3: destroy
import android.opengl.GLES20; //導入方法依賴的package包/類
/**
* 銷毀組件資源
* <p>
* 在GL線程調用
*/
public void destroy() {
if (mTexture != 0) {
int[] tex = new int[1];
tex[0] = mTexture;
GLES20.glDeleteTextures(1, tex, 0);
mTexture = 0;
}
}
示例4: testRgbRendering
import android.opengl.GLES20; //導入方法依賴的package包/類
@Test
@SmallTest
public void testRgbRendering() {
// Create EGL base with a pixel buffer as display output.
final EglBase eglBase = EglBase.create(null, EglBase.CONFIG_PIXEL_BUFFER);
eglBase.createPbufferSurface(WIDTH, HEIGHT);
eglBase.makeCurrent();
// Create RGB byte buffer plane with random content.
final ByteBuffer rgbPlane = ByteBuffer.allocateDirect(WIDTH * HEIGHT * 3);
final Random random = new Random(SEED);
random.nextBytes(rgbPlane.array());
// Upload the RGB byte buffer data as a texture.
final int rgbTexture = GlUtil.generateTexture(GLES20.GL_TEXTURE_2D);
GLES20.glActiveTexture(GLES20.GL_TEXTURE0);
GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, rgbTexture);
GLES20.glTexImage2D(GLES20.GL_TEXTURE_2D, 0, GLES20.GL_RGB, WIDTH, HEIGHT, 0, GLES20.GL_RGB,
GLES20.GL_UNSIGNED_BYTE, rgbPlane);
GlUtil.checkNoGLES2Error("glTexImage2D");
// Draw the RGB frame onto the pixel buffer.
final GlRectDrawer drawer = new GlRectDrawer();
drawer.drawRgb(rgbTexture, RendererCommon.identityMatrix(), WIDTH, HEIGHT, 0 /* viewportX */,
0 /* viewportY */, WIDTH, HEIGHT);
// Download the pixels in the pixel buffer as RGBA. Not all platforms support RGB, e.g. Nexus 9.
final ByteBuffer rgbaData = ByteBuffer.allocateDirect(WIDTH * HEIGHT * 4);
GLES20.glReadPixels(0, 0, WIDTH, HEIGHT, GLES20.GL_RGBA, GLES20.GL_UNSIGNED_BYTE, rgbaData);
GlUtil.checkNoGLES2Error("glReadPixels");
// Assert rendered image is pixel perfect to source RGB.
assertByteBufferEquals(WIDTH, HEIGHT, stripAlphaChannel(rgbaData), rgbPlane);
drawer.release();
GLES20.glDeleteTextures(1, new int[] {rgbTexture}, 0);
eglBase.release();
}
示例5: release
import android.opengl.GLES20; //導入方法依賴的package包/類
/**
* Releases cached resources. Uploader can still be used and the resources will be reallocated
* on first use.
*/
public void release() {
copyBuffer = null;
if (yuvTextures != null) {
GLES20.glDeleteTextures(3, yuvTextures, 0);
yuvTextures = null;
}
}
示例6: deleteTex
import android.opengl.GLES20; //導入方法依賴的package包/類
private static void deleteTex(int[] tex) {
if(tex.length == 1) {
GLES20.glDeleteTextures(1, tex, 0);
}
}
示例7: onDestroy
import android.opengl.GLES20; //導入方法依賴的package包/類
public void onDestroy() {
super.onDestroy();
GLES20.glDeleteTextures(inputTextureHandles.length, inputTextureHandles, 0);
for(int i = 0; i < inputTextureHandles.length; i++)
inputTextureHandles[i] = -1;
}
示例8: onDestroy
import android.opengl.GLES20; //導入方法依賴的package包/類
public void onDestroy(){
super.onDestroy();
GLES20.glDeleteTextures(1, mToneCurveTexture, 0);
mToneCurveTexture[0] = -1;
}
示例9: onDestroy
import android.opengl.GLES20; //導入方法依賴的package包/類
protected void onDestroy(){
super.onDestroy();
int[] texture = new int[]{mLookupSourceTexture};
GLES20.glDeleteTextures(1, texture, 0);
mLookupSourceTexture = -1;
}
示例10: onDestroy
import android.opengl.GLES20; //導入方法依賴的package包/類
protected void onDestroy() {
super.onDestroy();
GLES20.glDeleteTextures(1, inputTextureHandles, 0);
for(int i = 0; i < inputTextureHandles.length; i++)
inputTextureHandles[i] = -1;
}
示例11: onDestroy
import android.opengl.GLES20; //導入方法依賴的package包/類
public void onDestroy() {
super.onDestroy();
GLES20.glDeleteTextures(1, mToneCurveTexture, 0);
mToneCurveTexture[0] = -1;
}