当前位置: 首页>>代码示例>>Java>>正文


Java GLES20.glDeleteTextures方法代码示例

本文整理汇总了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();
}
 
开发者ID:lgyjg,项目名称:AndroidRTC,代码行数:16,代码来源:SurfaceTextureHelper.java

示例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;
    }
}
 
开发者ID:uestccokey,项目名称:EZFilter,代码行数:15,代码来源:VideoFBORender.java

示例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;
    }
}
 
开发者ID:uestccokey,项目名称:EZFilter,代码行数:14,代码来源:ComponentRender.java

示例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();
}
 
开发者ID:lgyjg,项目名称:AndroidRTC,代码行数:39,代码来源:GlRectDrawerTest.java

示例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;
  }
}
 
开发者ID:Piasy,项目名称:VideoCRE,代码行数:12,代码来源:RendererCommon.java

示例6: deleteTex

import android.opengl.GLES20; //导入方法依赖的package包/类
private static void deleteTex(int[] tex) {
    if(tex.length == 1) {
        GLES20.glDeleteTextures(1, tex, 0);
    }
}
 
开发者ID:vulovicv23,项目名称:opencv-documentscanner-android,代码行数:6,代码来源:CameraGLRendererBase.java

示例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;
}
 
开发者ID:smartbeng,项目名称:PaoMovie,代码行数:7,代码来源:MagicXproIIFilter.java

示例8: onDestroy

import android.opengl.GLES20; //导入方法依赖的package包/类
public void onDestroy(){
	super.onDestroy();
    GLES20.glDeleteTextures(1, mToneCurveTexture, 0);
    mToneCurveTexture[0] = -1;
}
 
开发者ID:smartbeng,项目名称:PaoMovie,代码行数:6,代码来源:MagicWhiteCatFilter.java

示例9: onDestroy

import android.opengl.GLES20; //导入方法依赖的package包/类
protected void onDestroy(){
	super.onDestroy();
    int[] texture = new int[]{mLookupSourceTexture};
    GLES20.glDeleteTextures(1, texture, 0);
    mLookupSourceTexture = -1;
}
 
开发者ID:smartbeng,项目名称:PaoMovie,代码行数:7,代码来源:MagicLookupFilter.java

示例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;
}
 
开发者ID:smartbeng,项目名称:PaoMovie,代码行数:7,代码来源:MagicFreudFilter.java

示例11: onDestroy

import android.opengl.GLES20; //导入方法依赖的package包/类
public void onDestroy() {
    super.onDestroy();
    GLES20.glDeleteTextures(1, mToneCurveTexture, 0);
    mToneCurveTexture[0] = -1;
}
 
开发者ID:smartbeng,项目名称:PaoMovie,代码行数:6,代码来源:MagiSkinWhitenFilter.java


注:本文中的android.opengl.GLES20.glDeleteTextures方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。