com.badlogic.gdx.graphics.glutils.FrameBuffer.build()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(2.9k)|赞(0)|评价(0)|浏览(137)

本文整理了Java中com.badlogic.gdx.graphics.glutils.FrameBuffer.build()方法的一些代码示例,展示了FrameBuffer.build()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FrameBuffer.build()方法的具体详情如下:
包路径:com.badlogic.gdx.graphics.glutils.FrameBuffer
类名称:FrameBuffer
方法名:build

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();
}

相关文章