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


Java FrameBuffer.RenderBuffer方法代码示例

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


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

示例1: updateFrameBuffer

import com.jme3.texture.FrameBuffer; //导入方法依赖的package包/类
public void updateFrameBuffer(FrameBuffer fb) {
    int id = fb.getId();
    if (id == -1) {
        // create FBO
        glGenFramebuffersEXT(intBuf1);
        id = intBuf1.get(0);
        fb.setId(id);
        objManager.registerForCleanup(fb);

        statistics.onNewFrameBuffer();
    }

    if (context.boundFBO != id) {
        glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, id);
        // binding an FBO automatically sets draw buf to GL_COLOR_ATTACHMENT0
        context.boundDrawBuf = 0;
        context.boundFBO = id;
    }

    FrameBuffer.RenderBuffer depthBuf = fb.getDepthBuffer();
    if (depthBuf != null) {
        updateFrameBufferAttachment(fb, depthBuf);
    }

    for (int i = 0; i < fb.getNumColorBuffers(); i++) {
        FrameBuffer.RenderBuffer colorBuf = fb.getColorBuffer(i);
        updateFrameBufferAttachment(fb, colorBuf);
    }

    fb.clearUpdateNeeded();
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:32,代码来源:LwjglRenderer.java

示例2: updateFrameBuffer

import com.jme3.texture.FrameBuffer; //导入方法依赖的package包/类
public void updateFrameBuffer(FrameBuffer fb) {
        int id = fb.getId();
        if (id == -1) {
            intBuf1.clear();
            // create FBO
            GLES20.glGenFramebuffers(1, intBuf1);
//            RendererUtil.checkGLError();

            id = intBuf1.get(0);
            fb.setId(id);
            objManager.registerForCleanup(fb);

            statistics.onNewFrameBuffer();
        }

        if (context.boundFBO != id) {
            GLES20.glBindFramebuffer(GLES20.GL_FRAMEBUFFER, id);
//            RendererUtil.checkGLError();

            // binding an FBO automatically sets draw buf to GL_COLOR_ATTACHMENT0
            context.boundDrawBuf = 0;
            context.boundFBO = id;
        }

        FrameBuffer.RenderBuffer depthBuf = fb.getDepthBuffer();
        if (depthBuf != null) {
            updateFrameBufferAttachment(fb, depthBuf);
        }

        for (int i = 0; i < fb.getNumColorBuffers(); i++) {
            FrameBuffer.RenderBuffer colorBuf = fb.getColorBuffer(i);
            updateFrameBufferAttachment(fb, colorBuf);
        }

        fb.clearUpdateNeeded();
    }
 
开发者ID:chototsu,项目名称:MikuMikuStudio,代码行数:37,代码来源:OGLESShaderRenderer.java

示例3: updateFrameBuffer

import com.jme3.texture.FrameBuffer; //导入方法依赖的package包/类
public void updateFrameBuffer(FrameBuffer fb) {
    int id = fb.getId();
    if (id == -1) {
        // create FBO
        id = genFramebufferId();
        fb.setId(id);
        objManager.registerForCleanup(fb);

        statistics.onNewFrameBuffer();
    }

    if (context.boundFBO != id) {
        bindFramebuffer(id);
        // binding an FBO automatically sets draw buf to GL_COLOR_ATTACHMENT0
        context.boundDrawBuf = 0;
        context.boundFBO = id;
    }

    FrameBuffer.RenderBuffer depthBuf = fb.getDepthBuffer();
    if (depthBuf != null) {
        updateFrameBufferAttachment(fb, depthBuf);
    }

    for (int i = 0; i < fb.getNumColorBuffers(); i++) {
        FrameBuffer.RenderBuffer colorBuf = fb.getColorBuffer(i);
        updateFrameBufferAttachment(fb, colorBuf);
    }

    fb.clearUpdateNeeded();
}
 
开发者ID:chototsu,项目名称:MikuMikuStudio,代码行数:31,代码来源:AbstractRenderer.java

示例4: bindRenderBuffer

import com.jme3.texture.FrameBuffer; //导入方法依赖的package包/类
@Override
public Image bindRenderBuffer(FrameBuffer.RenderBuffer rb, MemoryAccess ma) {
	if ((flags & FLAG_LOG_CREATION) != 0) LOG.log(Level.INFO, "{0}: bind render buffer {1} with  memory access {2}", new Object[]{this, rb, ma});
	return new LoggingImage(delegate.bindRenderBuffer(rb, ma), flags);
}
 
开发者ID:shamanDevel,项目名称:jME3-OpenCL-Library,代码行数:6,代码来源:LoggingContextFactory.java

示例5: bindPureRenderBuffer

import com.jme3.texture.FrameBuffer; //导入方法依赖的package包/类
@Override
protected Image bindPureRenderBuffer(FrameBuffer.RenderBuffer rb, MemoryAccess ma) {
	throw new UnsupportedOperationException("Not supported yet.");
}
 
开发者ID:shamanDevel,项目名称:jME3-OpenCL-Library,代码行数:5,代码来源:LoggingContextFactory.java

示例6: bindRenderBuffer

import com.jme3.texture.FrameBuffer; //导入方法依赖的package包/类
@Override
public Image bindRenderBuffer(FrameBuffer.RenderBuffer rb, MemoryAccess ma) {
	return new DebugImage(delegate.bindRenderBuffer(rb, ma), flags, true);
}
 
开发者ID:shamanDevel,项目名称:jME3-OpenCL-Library,代码行数:5,代码来源:DebugContextFactory.java


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