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


Java GLES20.glDeleteRenderbuffers方法代码示例

本文整理汇总了Java中android.opengl.GLES20.glDeleteRenderbuffers方法的典型用法代码示例。如果您正苦于以下问题:Java GLES20.glDeleteRenderbuffers方法的具体用法?Java GLES20.glDeleteRenderbuffers怎么用?Java GLES20.glDeleteRenderbuffers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.opengl.GLES20的用法示例。


在下文中一共展示了GLES20.glDeleteRenderbuffers方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: destroy

import android.opengl.GLES20; //导入方法依赖的package包/类
@Override
public void destroy() {
    super.destroy();
    if (mFrameBuffer != null) {
        GLES20.glDeleteFramebuffers(1, mFrameBuffer, 0);
        mFrameBuffer = null;
    }
    if (mDepthRenderBuffer != null) {
        GLES20.glDeleteRenderbuffers(1, mDepthRenderBuffer, 0);
        mDepthRenderBuffer = null;
    }
    if (mTextureOut != null) {
        GLES20.glDeleteTextures(1, mTextureOut, 0);
        mTextureOut = null;
    }
}
 
开发者ID:uestccokey,项目名称:EZFilter,代码行数:17,代码来源:FBORender.java

示例2: destroyFrameBuffer

import android.opengl.GLES20; //导入方法依赖的package包/类
/**
 * 销毁FrameBuffer
 */
public void destroyFrameBuffer(){
    if(mFrameTemp!=null){
        GLES20.glDeleteFramebuffers(1,mFrameTemp,0);
        GLES20.glDeleteTextures(1,mFrameTemp,1);
        if(mFrameTemp[2]>0){
            GLES20.glDeleteRenderbuffers(1,mFrameTemp,2);
        }
        mFrameTemp=null;
    }
}
 
开发者ID:aiyaapp,项目名称:AAVT,代码行数:14,代码来源:FrameBuffer.java

示例3: releaseGl

import android.opengl.GLES20; //导入方法依赖的package包/类
/**
 * Releases most of the GL resources we currently hold.
 * <p>
 * Does not release EglCore.
 */
private void releaseGl() {
    GlUtil.checkGlError("releaseGl start");

    int[] values = new int[1];

    if (mWindowSurface != null) {
        mWindowSurface.release();
        mWindowSurface = null;
    }
    if (mProgram != null) {
        mProgram.release();
        mProgram = null;
    }
    if (mOffscreenTexture > 0) {
        values[0] = mOffscreenTexture;
        GLES20.glDeleteTextures(1, values, 0);
        mOffscreenTexture = -1;
    }
    if (mFramebuffer > 0) {
        values[0] = mFramebuffer;
        GLES20.glDeleteFramebuffers(1, values, 0);
        mFramebuffer = -1;
    }
    if (mDepthBuffer > 0) {
        values[0] = mDepthBuffer;
        GLES20.glDeleteRenderbuffers(1, values, 0);
        mDepthBuffer = -1;
    }
    if (mFullScreen != null) {
        mFullScreen.release(false); // TODO: should be "true"; must ensure mEglCore current
        mFullScreen = null;
    }

    GlUtil.checkGlError("releaseGl done");

    mEglCore.makeNothingCurrent();
}
 
开发者ID:AndyZhu1991,项目名称:grafika,代码行数:43,代码来源:RecordFBOActivity.java

示例4: destroyFrameBuffers

import android.opengl.GLES20; //导入方法依赖的package包/类
private void destroyFrameBuffers() {
    if (mFrameBufferTextures != null) {
        GLES20.glDeleteTextures(mFrameBufferTextures.length, mFrameBufferTextures, 0);
        mFrameBufferTextures = null;
    }
    if (mFrameBuffers != null) {
        GLES20.glDeleteFramebuffers(mFrameBuffers.length, mFrameBuffers, 0);
        mFrameBuffers = null;
    }

    if (mRenderBuffers != null) {
        GLES20.glDeleteRenderbuffers(mRenderBuffers.length, mRenderBuffers, 0);
        mRenderBuffers = null;
    }
}
 
开发者ID:hoanganhtuan95ptit,项目名称:EditPhoto,代码行数:16,代码来源:FilterGroup.java

示例5: delete

import android.opengl.GLES20; //导入方法依赖的package包/类
public void delete() {
	int[] buffers = {id};
	GLES20.glDeleteRenderbuffers(1, buffers, 0);
}
 
开发者ID:G2159687,项目名称:ESPD,代码行数:5,代码来源:Renderbuffer.java

示例6: delete

import android.opengl.GLES20; //导入方法依赖的package包/类
public void delete() {
	int[] buffers = {id};
	GLES20.glDeleteRenderbuffers( 1, buffers, 0 );
}
 
开发者ID:mango-tree,项目名称:UNIST-pixel-dungeon,代码行数:5,代码来源:Renderbuffer.java

示例7: initFBO

import android.opengl.GLES20; //导入方法依赖的package包/类
private void initFBO() {
    // 初始化输出纹理
    if (mTextureOut != null) {
        GLES20.glDeleteTextures(1, mTextureOut, 0);
        mTextureOut = null;
    }
    mTextureOut = new int[1];
    GLES20.glGenTextures(1, mTextureOut, 0);
    GLES20.glActiveTexture(GLES20.GL_TEXTURE0);
    GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, mTextureOut[0]);
    GLES20.glTexImage2D(GLES20.GL_TEXTURE_2D, 0, GLES20.GL_RGBA,
            getWidth(), getHeight(), 0, GLES20.GL_RGBA,
            GLES20.GL_UNSIGNED_BYTE, null);
    GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_WRAP_S,
            GLES20.GL_CLAMP_TO_EDGE);
    GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_WRAP_T,
            GLES20.GL_CLAMP_TO_EDGE);
    GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D,
            GLES20.GL_TEXTURE_MAG_FILTER, GLES20.GL_LINEAR);
    GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D,
            GLES20.GL_TEXTURE_MIN_FILTER, GLES20.GL_LINEAR);

    // 初始化帧缓冲和深度缓冲
    if (mFrameBuffer != null) {
        GLES20.glDeleteFramebuffers(1, mFrameBuffer, 0);
        mFrameBuffer = null;
    }
    if (mDepthRenderBuffer != null) {
        GLES20.glDeleteRenderbuffers(1, mDepthRenderBuffer, 0);
        mDepthRenderBuffer = null;
    }
    mFrameBuffer = new int[1];
    mDepthRenderBuffer = new int[1];
    GLES20.glGenFramebuffers(1, mFrameBuffer, 0);
    GLES20.glGenRenderbuffers(1, mDepthRenderBuffer, 0);
    GLES20.glBindFramebuffer(GLES20.GL_FRAMEBUFFER, mFrameBuffer[0]);
    GLES20.glFramebufferTexture2D(GLES20.GL_FRAMEBUFFER,
            GLES20.GL_COLOR_ATTACHMENT0, GLES20.GL_TEXTURE_2D,
            mTextureOut[0], 0);
    GLES20.glBindRenderbuffer(GLES20.GL_RENDERBUFFER, mDepthRenderBuffer[0]);
    GLES20.glRenderbufferStorage(GLES20.GL_RENDERBUFFER,
            GLES20.GL_DEPTH_COMPONENT16, getWidth(), getHeight());
    GLES20.glFramebufferRenderbuffer(GLES20.GL_FRAMEBUFFER,
            GLES20.GL_DEPTH_ATTACHMENT, GLES20.GL_RENDERBUFFER,
            mDepthRenderBuffer[0]);
}
 
开发者ID:uestccokey,项目名称:EZFilter,代码行数:47,代码来源:FBORender.java


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