本文整理汇总了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();
}
示例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();
}
示例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();
}
示例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);
}
示例5: bindPureRenderBuffer
import com.jme3.texture.FrameBuffer; //导入方法依赖的package包/类
@Override
protected Image bindPureRenderBuffer(FrameBuffer.RenderBuffer rb, MemoryAccess ma) {
throw new UnsupportedOperationException("Not supported yet.");
}
示例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);
}