Assert.assertEquals(0L, (long) fb.framebufferGetStencilBits()); Assert.assertEquals(0L, (long) fb.framebufferGetDepthBits());
Assert.assertEquals(8L, (long) fb.framebufferGetStencilBits()); Assert.assertEquals(24L, (long) fb.framebufferGetDepthBits());
@Test public final void testFramebufferBuildDepthStencil() { final Interfaces i = this.getInterfaces("main"); final JCGLFramebuffersType g_fb = i.getFramebuffers(); final JCGLTexturesType g_tx = i.getTextures(); final JCGLFramebufferBuilderType fbb = g_fb.framebufferNewBuilder(); final List<JCGLTextureUnitType> us = g_tx.textureGetUnits(); final JCGLTextureUnitType u0 = us.get(0); final JCGLTexture2DType t = g_tx.texture2DAllocate( u0, 64L, 64L, JCGLTextureFormat.TEXTURE_FORMAT_DEPTH_24_STENCIL_8_4BPP, JCGLTextureWrapS.TEXTURE_WRAP_REPEAT, JCGLTextureWrapT.TEXTURE_WRAP_REPEAT, JCGLTextureFilterMinification.TEXTURE_FILTER_NEAREST, JCGLTextureFilterMagnification.TEXTURE_FILTER_NEAREST); fbb.attachDepthStencilTexture2D(t); final JCGLFramebufferType fb = g_fb.framebufferAllocate(fbb); Assert.assertEquals(8L, (long) fb.framebufferGetStencilBits()); Assert.assertEquals(24L, (long) fb.framebufferGetDepthBits()); final Set<JCGLReferableType> refs = fb.getReferences(); Assert.assertEquals(1L, (long) refs.size()); Assert.assertTrue(refs.contains(t)); }
Assert.assertEquals(0L, (long) fb.framebufferGetStencilBits()); Assert.assertEquals(0L, (long) fb.framebufferGetDepthBits());
Assert.assertEquals(0L, (long) fb.framebufferGetStencilBits()); Assert.assertEquals(0L, (long) fb.framebufferGetDepthBits());
@Test public final void testFramebufferBuildDepthOnly() { final Interfaces i = this.getInterfaces("main"); final JCGLFramebuffersType g_fb = i.getFramebuffers(); final JCGLTexturesType g_tx = i.getTextures(); final JCGLFramebufferBuilderType fbb = g_fb.framebufferNewBuilder(); final List<JCGLTextureUnitType> us = g_tx.textureGetUnits(); final JCGLTextureUnitType u0 = us.get(0); final JCGLTexture2DType t = g_tx.texture2DAllocate( u0, 64L, 64L, JCGLTextureFormat.TEXTURE_FORMAT_DEPTH_16_2BPP, JCGLTextureWrapS.TEXTURE_WRAP_REPEAT, JCGLTextureWrapT.TEXTURE_WRAP_REPEAT, JCGLTextureFilterMinification.TEXTURE_FILTER_NEAREST, JCGLTextureFilterMagnification.TEXTURE_FILTER_NEAREST); fbb.attachDepthTexture2D(t); final JCGLFramebufferType fb = g_fb.framebufferAllocate(fbb); Assert.assertEquals(0L, (long) fb.framebufferGetStencilBits()); Assert.assertEquals(16L, (long) fb.framebufferGetDepthBits()); }