/** * Enables the use of a depth buffer for this <code>FrameBuffer</code>. * * @param format The format to use for the depth buffer. * @throws IllegalArgumentException If <code>format</code> is not a depth format. */ public void setDepthBuffer(Image.Format format){ if (id != -1) throw new UnsupportedOperationException("FrameBuffer already initialized."); if (!format.isDepthFormat()) throw new IllegalArgumentException("Depth buffer format must be depth."); depthBuf = new RenderBuffer(); depthBuf.slot = format.isDepthStencilFormat() ? SLOT_DEPTH_STENCIL : SLOT_DEPTH; depthBuf.format = format; }
public void setDepthTexture(TextureArray tex, int layer){ if (id != -1) throw new UnsupportedOperationException("FrameBuffer already initialized."); Image img = tex.getImage(); checkSetTexture(tex, true); depthBuf = new RenderBuffer(); depthBuf.slot = img.getFormat().isDepthStencilFormat() ? SLOT_DEPTH_STENCIL : SLOT_DEPTH; depthBuf.tex = tex; depthBuf.format = img.getFormat(); depthBuf.layer = layer; }
/** * Set the depth texture to use for this framebuffer. * * @param tex The color texture to set. */ public void setDepthTexture(Texture2D tex){ if (id != -1) throw new UnsupportedOperationException("FrameBuffer already initialized."); Image img = tex.getImage(); checkSetTexture(tex, true); depthBuf = new RenderBuffer(); depthBuf.slot = img.getFormat().isDepthStencilFormat() ? SLOT_DEPTH_STENCIL : SLOT_DEPTH; depthBuf.tex = tex; depthBuf.format = img.getFormat(); } public void setDepthTexture(TextureArray tex, int layer){
/** * Set the depth texture to use for this framebuffer. * * @param tex The color texture to set. */ public void setDepthTexture(Texture2D tex){ if (id != -1) throw new UnsupportedOperationException("FrameBuffer already initialized."); Image img = tex.getImage(); checkSetTexture(tex, true); depthBuf = new RenderBuffer(); depthBuf.slot = img.getFormat().isDepthStencilFormat() ? SLOT_DEPTH_STENCIL : SLOT_DEPTH; depthBuf.tex = tex; depthBuf.format = img.getFormat(); } public void setDepthTexture(TextureArray tex, int layer){
/** * Enables the use of a depth buffer for this <code>FrameBuffer</code>. * * @param format The format to use for the depth buffer. * @throws IllegalArgumentException If <code>format</code> is not a depth format. */ public void setDepthBuffer(Image.Format format){ if (id != -1) throw new UnsupportedOperationException("FrameBuffer already initialized."); if (!format.isDepthFormat()) throw new IllegalArgumentException("Depth buffer format must be depth."); depthBuf = new RenderBuffer(); depthBuf.slot = format.isDepthStencilFormat() ? SLOT_DEPTH_STENCIL : SLOT_DEPTH; depthBuf.format = format; }
public void setDepthTexture(TextureArray tex, int layer){ if (id != -1) throw new UnsupportedOperationException("FrameBuffer already initialized."); Image img = tex.getImage(); checkSetTexture(tex, true); depthBuf = new RenderBuffer(); depthBuf.slot = img.getFormat().isDepthStencilFormat() ? SLOT_DEPTH_STENCIL : SLOT_DEPTH; depthBuf.tex = tex; depthBuf.format = img.getFormat(); depthBuf.layer = layer; }