本文整理了Java中com.badlogic.gdx.graphics.glutils.FrameBuffer.build()
方法的一些代码示例,展示了FrameBuffer.build()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FrameBuffer.build()
方法的具体详情如下:
包路径:com.badlogic.gdx.graphics.glutils.FrameBuffer
类名称:FrameBuffer
方法名:build
暂无
代码示例来源:origin: libgdx/libgdx
/** Creates a new FrameBuffer having the given dimensions and potentially a depth and a stencil buffer attached.
*
* @param format the format of the color buffer; according to the OpenGL ES 2.0 spec, only RGB565, RGBA4444 and RGB5_A1 are
* color-renderable
* @param width the width of the framebuffer in pixels
* @param height the height of the framebuffer in pixels
* @param hasDepth whether to attach a depth buffer
* @throws com.badlogic.gdx.utils.GdxRuntimeException in case the FrameBuffer could not be created */
public FrameBuffer (Pixmap.Format format, int width, int height, boolean hasDepth, boolean hasStencil) {
FrameBufferBuilder frameBufferBuilder = new FrameBufferBuilder(width, height);
frameBufferBuilder.addBasicColorTextureAttachment(format);
if (hasDepth) frameBufferBuilder.addBasicDepthRenderBuffer();
if (hasStencil) frameBufferBuilder.addBasicStencilRenderBuffer();
this.bufferBuilder = frameBufferBuilder;
build();
}
代码示例来源:origin: libgdx/libgdx
/** Creates a new FrameBuffer having the given dimensions and potentially a depth and a stencil buffer attached.
*
* @param format the format of the color buffer; according to the OpenGL ES 2.0 spec, only RGB565, RGBA4444 and RGB5_A1 are
* color-renderable
* @param width the width of the framebuffer in pixels
* @param height the height of the framebuffer in pixels
* @param hasDepth whether to attach a depth buffer
* @throws com.badlogic.gdx.utils.GdxRuntimeException in case the FrameBuffer could not be created */
public FrameBuffer (Pixmap.Format format, int width, int height, boolean hasDepth, boolean hasStencil) {
FrameBufferBuilder frameBufferBuilder = new FrameBufferBuilder(width, height);
frameBufferBuilder.addBasicColorTextureAttachment(format);
if (hasDepth) frameBufferBuilder.addBasicDepthRenderBuffer();
if (hasStencil) frameBufferBuilder.addBasicStencilRenderBuffer();
this.bufferBuilder = frameBufferBuilder;
build();
}
代码示例来源:origin: com.badlogicgames.gdx/gdx
/** Creates a new FrameBuffer having the given dimensions and potentially a depth and a stencil buffer attached.
*
* @param format the format of the color buffer; according to the OpenGL ES 2.0 spec, only RGB565, RGBA4444 and RGB5_A1 are
* color-renderable
* @param width the width of the framebuffer in pixels
* @param height the height of the framebuffer in pixels
* @param hasDepth whether to attach a depth buffer
* @throws com.badlogic.gdx.utils.GdxRuntimeException in case the FrameBuffer could not be created */
public FrameBuffer (Pixmap.Format format, int width, int height, boolean hasDepth, boolean hasStencil) {
FrameBufferBuilder frameBufferBuilder = new FrameBufferBuilder(width, height);
frameBufferBuilder.addBasicColorTextureAttachment(format);
if (hasDepth) frameBufferBuilder.addBasicDepthRenderBuffer();
if (hasStencil) frameBufferBuilder.addBasicStencilRenderBuffer();
this.bufferBuilder = frameBufferBuilder;
build();
}
内容来源于网络,如有侵权,请联系作者删除!