本文整理了Java中com.jme3.texture.FrameBuffer.setColorBuffer()
方法的一些代码示例,展示了FrameBuffer.setColorBuffer()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FrameBuffer.setColorBuffer()
方法的具体详情如下:
包路径:com.jme3.texture.FrameBuffer
类名称:FrameBuffer
方法名:setColorBuffer
[英]Enables the use of a color buffer for this FrameBuffer
.
[中]启用此FrameBuffer
的颜色缓冲区的使用。
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
fb.setColorBuffer(Format.RGB8);
fb.setSrgb(srgb);
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
} else {
renderFrameBufferMS.setDepthBuffer(depthFormat);
renderFrameBufferMS.setColorBuffer(fbFormat);
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
public void reshape(ViewPort vp, int w, int h){
if (mainSceneFB != null){
renderer.deleteFrameBuffer(mainSceneFB);
}
mainSceneFB = new FrameBuffer(w, h, 1);
mainScene = new Texture2D(w, h, bufFormat);
mainSceneFB.setDepthBuffer(Format.Depth);
mainSceneFB.setColorTexture(mainScene);
mainScene.setMagFilter(fbMagFilter);
mainScene.setMinFilter(fbMinFilter);
if (msFB != null){
renderer.deleteFrameBuffer(msFB);
}
tone.setTexture("Texture", mainScene);
Collection<Caps> caps = renderer.getCaps();
if (numSamples > 1 && caps.contains(Caps.FrameBufferMultisample)){
msFB = new FrameBuffer(w, h, numSamples);
msFB.setDepthBuffer(Format.Depth);
msFB.setColorBuffer(bufFormat);
vp.setOutputFrameBuffer(msFB);
}else{
if (numSamples > 1)
logger.warning("FBO multisampling not supported on this GPU, request ignored.");
vp.setOutputFrameBuffer(mainSceneFB);
}
createLumShaders();
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
offBuffer.setColorBuffer(Format.RGBA8);
代码示例来源:origin: us.ihmc/IHMCJMonkeyEngineToolkit
public void setupOffscreenView(int width, int height)
{
if (viewportType == ViewportType.CANVAS)
{
throw new RuntimeException("Viewport is setup for canvas rendering");
}
frameBuffer = new FrameBuffer(width, height, 1);
viewPort.setOutputFrameBuffer(frameBuffer);
viewPort.getCamera().resize(width, height, true);
frameBuffer.setDepthBuffer(Format.Depth);
frameBuffer.setColorBuffer(Format.RGBA8);
}
代码示例来源:origin: us.ihmc/ihmc-jmonkey-engine-toolkit
public void setupOffscreenView(int width, int height)
{
if (viewportType == ViewportType.CANVAS)
{
throw new RuntimeException("Viewport is setup for canvas rendering");
}
frameBuffer = new FrameBuffer(width, height, 1);
viewPort.setOutputFrameBuffer(frameBuffer);
viewPort.getCamera().resize(width, height, true);
frameBuffer.setDepthBuffer(Format.Depth);
frameBuffer.setColorBuffer(Format.RGBA8);
}
代码示例来源:origin: us.ihmc.thirdparty.jme/jme3-desktop
fb.setColorBuffer(Format.RGB8);
fb.setSrgb(srgb);
代码示例来源:origin: info.projectkyoto/mms-engine
} else {
renderFrameBufferMS.setDepthBuffer(Format.Depth);
renderFrameBufferMS.setColorBuffer(Format.RGBA8);
代码示例来源:origin: org.jmonkeyengine/jme3-core
} else {
renderFrameBufferMS.setDepthBuffer(depthFormat);
renderFrameBufferMS.setColorBuffer(fbFormat);
代码示例来源:origin: info.projectkyoto/mms-engine
public void reshape(ViewPort vp, int w, int h){
if (mainSceneFB != null){
renderer.deleteFrameBuffer(mainSceneFB);
}
mainSceneFB = new FrameBuffer(w, h, 1);
mainScene = new Texture2D(w, h, bufFormat);
mainSceneFB.setDepthBuffer(Format.Depth);
mainSceneFB.setColorTexture(mainScene);
mainScene.setMagFilter(fbMagFilter);
mainScene.setMinFilter(fbMinFilter);
if (msFB != null){
renderer.deleteFrameBuffer(msFB);
}
tone.setTexture("Texture", mainScene);
Collection<Caps> caps = renderer.getCaps();
if (numSamples > 1 && caps.contains(Caps.FrameBufferMultisample)){
msFB = new FrameBuffer(w, h, numSamples);
msFB.setDepthBuffer(Format.Depth);
msFB.setColorBuffer(bufFormat);
vp.setOutputFrameBuffer(msFB);
}else{
if (numSamples > 1)
logger.warning("FBO multisampling not supported on this GPU, request ignored.");
vp.setOutputFrameBuffer(mainSceneFB);
}
createLumShaders();
}
代码示例来源:origin: org.jmonkeyengine/jme3-core
public void reshape(ViewPort vp, int w, int h){
if (mainSceneFB != null){
renderer.deleteFrameBuffer(mainSceneFB);
}
mainSceneFB = new FrameBuffer(w, h, 1);
mainScene = new Texture2D(w, h, bufFormat);
mainSceneFB.setDepthBuffer(Format.Depth);
mainSceneFB.setColorTexture(mainScene);
mainScene.setMagFilter(fbMagFilter);
mainScene.setMinFilter(fbMinFilter);
if (msFB != null){
renderer.deleteFrameBuffer(msFB);
}
tone.setTexture("Texture", mainScene);
Collection<Caps> caps = renderer.getCaps();
if (numSamples > 1 && caps.contains(Caps.FrameBufferMultisample)){
msFB = new FrameBuffer(w, h, numSamples);
msFB.setDepthBuffer(Format.Depth);
msFB.setColorBuffer(bufFormat);
vp.setOutputFrameBuffer(msFB);
}else{
if (numSamples > 1)
logger.warning("FBO multisampling not supported on this GPU, request ignored.");
vp.setOutputFrameBuffer(mainSceneFB);
}
createLumShaders();
}
代码示例来源:origin: us.ihmc/ihmc-jmonkey-engine-toolkit
frameBuffer.setColorBuffer(Format.RGB8);
代码示例来源:origin: us.ihmc/IHMCJMonkeyEngineToolkit
frameBuffer.setColorBuffer(Format.RGB8);
代码示例来源:origin: us.ihmc/ihmc-perception
offBuffer.setColorBuffer(Format.RGBA8);
代码示例来源:origin: us.ihmc/IHMCPerception
offBuffer.setColorBuffer(Format.RGBA8);
代码示例来源:origin: us.ihmc/IHMCJMonkeyEngineToolkit
public LidarDistortionProcessor(JMERenderer jmeRenderer, int scansPerSweep, int scanHeight, int numberOfCameras, float startAngle, float fieldOfView,
LidarSceneViewPort[] lidarSceneProcessors)
{
ViewPort viewport = jmeRenderer.getRenderManager().createPostView("LidarDistortionViewport", new Camera(scansPerSweep, scanHeight));
this.scansPerSweep = scansPerSweep;
this.scanHeight = scanHeight;
this.scan = new float[scanHeight * scansPerSweep];
this.lidarOutFloatBuffer = BufferUtils.createFloatBuffer(scansPerSweep * scanHeight);
FrameBuffer distortionFrameBuffer = new FrameBuffer(scansPerSweep, scanHeight, 1);
distortionFrameBuffer.setColorBuffer(Format.RGBA32F);
Material distortionMaterial = createDistortionMaterial(jmeRenderer.getAssetManager(), scansPerSweep, numberOfCameras, startAngle, fieldOfView,
lidarSceneProcessors);
Picture distortionPicture = new Picture("Distortion");
distortionPicture.setMaterial(distortionMaterial);
distortionPicture.setHeight(scanHeight);
distortionPicture.setWidth(scansPerSweep);
distortionPicture.setQueueBucket(Bucket.Gui);
distortionPicture.setCullHint(CullHint.Never);
viewport.attachScene(distortionPicture);
viewport.setClearFlags(true, true, true);
viewport.setOutputFrameBuffer(distortionFrameBuffer);
viewport.addProcessor(this);
distortionPicture.updateGeometricState();
}
代码示例来源:origin: us.ihmc/ihmc-jmonkey-engine-toolkit
public LidarDistortionProcessor(JMERenderer jmeRenderer, int scansPerSweep, int scanHeight, int numberOfCameras, float startAngle, float fieldOfView,
LidarSceneViewPort[] lidarSceneProcessors)
{
ViewPort viewport = jmeRenderer.getRenderManager().createPostView("LidarDistortionViewport", new Camera(scansPerSweep, scanHeight));
this.scansPerSweep = scansPerSweep;
this.scanHeight = scanHeight;
this.scan = new float[scanHeight * scansPerSweep];
this.lidarOutFloatBuffer = BufferUtils.createFloatBuffer(scansPerSweep * scanHeight);
FrameBuffer distortionFrameBuffer = new FrameBuffer(scansPerSweep, scanHeight, 1);
distortionFrameBuffer.setColorBuffer(Format.RGBA32F);
Material distortionMaterial = createDistortionMaterial(jmeRenderer.getAssetManager(), scansPerSweep, numberOfCameras, startAngle, fieldOfView,
lidarSceneProcessors);
Picture distortionPicture = new Picture("Distortion");
distortionPicture.setMaterial(distortionMaterial);
distortionPicture.setHeight(scanHeight);
distortionPicture.setWidth(scansPerSweep);
distortionPicture.setQueueBucket(Bucket.Gui);
distortionPicture.setCullHint(CullHint.Never);
viewport.attachScene(distortionPicture);
viewport.setClearFlags(true, true, true);
viewport.setOutputFrameBuffer(distortionFrameBuffer);
viewport.addProcessor(this);
distortionPicture.updateGeometricState();
}
代码示例来源:origin: us.ihmc/IHMCPerception
offBuffer.setColorBuffer(Format.RGBA8);
代码示例来源:origin: us.ihmc/ihmc-perception
offBuffer.setColorBuffer(Format.RGBA8);
内容来源于网络,如有侵权,请联系作者删除!