private void framebufferAllocateConfigureDepth( final Builder bb, final int f_id, final FakeFramebuffer fb) { Preconditions.checkPrecondition( bb.depth_stencil, bb.depth_stencil == null, ignored -> "Depth stencil must be null"); bb.depth.matchDepthAttachment( new JCGLFramebufferDepthAttachmentMatcherType<Unit, UnreachableCodeException>() { @Override public Unit onTexture2D( final JCGLTexture2DUsableType t) throws JCGLException { FakeFramebuffers.LOG.debug( "[{}] attach {} at depth", Integer.valueOf(f_id), t); final JCGLTextureFormat f = t.textureGetFormat(); FakeTextures.checkTexture2D(FakeFramebuffers.this.context, t); JCGLTextureFormats.checkDepthOnlyRenderableTexture2D(f); fb.setDepthAttachment(t, JCGLTextureFormats.getDepthBits(f)); return Unit.unit(); } }); }
private void framebufferAllocateConfigureDepth( final Builder bb, final int f_id, final FakeFramebuffer fb) { Preconditions.checkPrecondition( bb.depth_stencil, bb.depth_stencil == null, ignored -> "Depth stencil must be null"); bb.depth.matchDepthAttachment( new JCGLFramebufferDepthAttachmentMatcherType<Unit, UnreachableCodeException>() { @Override public Unit onTexture2D( final JCGLTexture2DUsableType t) throws JCGLException { LOG.debug( "[{}] attach {} at depth", Integer.valueOf(f_id), t); final JCGLTextureFormat f = t.format(); FakeTextures.checkTexture2D(FakeFramebuffers.this.context, t); JCGLTextureFormats.checkDepthOnlyRenderableTexture2D(f); fb.setDepthAttachment(t, JCGLTextureFormats.depthBits(f)); return Unit.unit(); } }); }
ignored -> "Depth stencil must be null"); bb.depth.matchDepthAttachment( new JCGLFramebufferDepthAttachmentMatcherType<Unit, UnreachableCodeException>()
ignored -> "Depth stencil must be null"); bb.depth.matchDepthAttachment( new JCGLFramebufferDepthAttachmentMatcherType<Unit, UnreachableCodeException>()