private static JCGLFramebufferType depthlessFramebuffer( final JCGLFramebuffersType g_fb, final JCGLTexturesType g_tex) { final JCGLTextureUnitType u0 = g_tex.textureGetUnits().get(0); final JCGLTexture2DType t = g_tex.texture2DAllocate( u0, 64L, 64L, JCGLTextureFormat.TEXTURE_FORMAT_RGBA_8_4BPP, JCGLTextureWrapS.TEXTURE_WRAP_REPEAT, JCGLTextureWrapT.TEXTURE_WRAP_REPEAT, JCGLTextureFilterMinification.TEXTURE_FILTER_NEAREST, JCGLTextureFilterMagnification.TEXTURE_FILTER_NEAREST); g_tex.textureUnitUnbind(u0); final JCGLFramebufferBuilderType fbb = g_fb.framebufferNewBuilder(); fbb.attachColorTexture2DAt( g_fb.framebufferGetColorAttachments().get(0), g_fb.framebufferGetDrawBuffers().get(0), t); return g_fb.framebufferAllocate(fbb); }
private static JCGLFramebufferType depthlessFramebuffer( final JCGLFramebuffersType g_fb, final JCGLTexturesType g_tex) { final JCGLTextureUnitType u0 = g_tex.textureGetUnits().get(0); final JCGLTexture2DType t = g_tex.texture2DAllocate( u0, 64L, 64L, JCGLTextureFormat.TEXTURE_FORMAT_RGBA_8_4BPP, JCGLTextureWrapS.TEXTURE_WRAP_REPEAT, JCGLTextureWrapT.TEXTURE_WRAP_REPEAT, JCGLTextureFilterMinification.TEXTURE_FILTER_NEAREST, JCGLTextureFilterMagnification.TEXTURE_FILTER_NEAREST); g_tex.textureUnitUnbind(u0); final JCGLFramebufferBuilderType fbb = g_fb.framebufferNewBuilder(); fbb.attachColorTexture2DAt( g_fb.framebufferGetColorAttachments().get(0), g_fb.framebufferGetDrawBuffers().get(0), t); return g_fb.framebufferAllocate(fbb); }
private static JCGLFramebufferType stencillessFramebuffer( final JCGLFramebuffersType g_fb, final JCGLTexturesType g_tex) { final JCGLTextureUnitType u0 = g_tex.textureGetUnits().get(0); final JCGLTexture2DType t = g_tex.texture2DAllocate( u0, 64L, 64L, JCGLTextureFormat.TEXTURE_FORMAT_RGBA_8_4BPP, JCGLTextureWrapS.TEXTURE_WRAP_REPEAT, JCGLTextureWrapT.TEXTURE_WRAP_REPEAT, JCGLTextureFilterMinification.TEXTURE_FILTER_NEAREST, JCGLTextureFilterMagnification.TEXTURE_FILTER_NEAREST); g_tex.textureUnitUnbind(u0); final JCGLFramebufferBuilderType fbb = g_fb.framebufferNewBuilder(); fbb.attachColorTexture2DAt( g_fb.framebufferGetColorAttachments().get(0), g_fb.framebufferGetDrawBuffers().get(0), t); return g_fb.framebufferAllocate(fbb); }
private static JCGLFramebufferType stencillessFramebuffer( final JCGLFramebuffersType g_fb, final JCGLTexturesType g_tex) { final JCGLTextureUnitType u0 = g_tex.textureGetUnits().get(0); final JCGLTexture2DType t = g_tex.texture2DAllocate( u0, 64L, 64L, JCGLTextureFormat.TEXTURE_FORMAT_RGBA_8_4BPP, JCGLTextureWrapS.TEXTURE_WRAP_REPEAT, JCGLTextureWrapT.TEXTURE_WRAP_REPEAT, JCGLTextureFilterMinification.TEXTURE_FILTER_NEAREST, JCGLTextureFilterMagnification.TEXTURE_FILTER_NEAREST); g_tex.textureUnitUnbind(u0); final JCGLFramebufferBuilderType fbb = g_fb.framebufferNewBuilder(); fbb.attachColorTexture2DAt( g_fb.framebufferGetColorAttachments().get(0), g_fb.framebufferGetDrawBuffers().get(0), t); return g_fb.framebufferAllocate(fbb); }
@Test public final void testTexture2DRegenerateMipmapsUnbound() { final JCGLTexturesType t = this.getTextures("main"); final List<JCGLTextureUnitType> us = t.textureGetUnits(); final JCGLTextureUnitType u0 = us.get(0); final JCGLTexture2DType ta = t.texture2DAllocate( u0, 256L, 256L, JCGLTextureFormat.TEXTURE_FORMAT_RGBA_8_4BPP, JCGLTextureWrapS.TEXTURE_WRAP_REPEAT, JCGLTextureWrapT.TEXTURE_WRAP_REPEAT, JCGLTextureFilterMinification.TEXTURE_FILTER_LINEAR_MIPMAP_LINEAR, JCGLTextureFilterMagnification.TEXTURE_FILTER_LINEAR); Assert.assertTrue(t.texture2DIsBoundAnywhere(ta)); t.textureUnitUnbind(u0); this.expected.expect(JCGLExceptionTextureNotBound.class); t.texture2DRegenerateMipmaps(u0); }
@Test public final void testTexture2DRegenerateMipmapsUnbound() { final JCGLTexturesType t = this.getTextures("main"); final List<JCGLTextureUnitType> us = t.textureGetUnits(); final JCGLTextureUnitType u0 = us.get(0); final JCGLTexture2DType ta = t.texture2DAllocate( u0, 256L, 256L, JCGLTextureFormat.TEXTURE_FORMAT_RGBA_8_4BPP, JCGLTextureWrapS.TEXTURE_WRAP_REPEAT, JCGLTextureWrapT.TEXTURE_WRAP_REPEAT, JCGLTextureFilterMinification.TEXTURE_FILTER_LINEAR_MIPMAP_LINEAR, JCGLTextureFilterMagnification.TEXTURE_FILTER_LINEAR); Assert.assertTrue(t.texture2DIsBoundAnywhere(ta)); t.textureUnitUnbind(u0); this.expected.expect(JCGLExceptionTextureNotBound.class); t.texture2DRegenerateMipmaps(u0); }
@Test public final void testTextureCubeRegenerateMipmapsUnbound() { final JCGLTexturesType t = this.getTextures("main"); final List<JCGLTextureUnitType> us = t.textureGetUnits(); final JCGLTextureUnitType u0 = us.get(0); final JCGLTextureCubeType ta = t.textureCubeAllocate( u0, 256L, JCGLTextureFormat.TEXTURE_FORMAT_RGBA_8_4BPP, JCGLTextureWrapR.TEXTURE_WRAP_REPEAT, JCGLTextureWrapS.TEXTURE_WRAP_REPEAT, JCGLTextureWrapT.TEXTURE_WRAP_REPEAT, JCGLTextureFilterMinification.TEXTURE_FILTER_LINEAR_MIPMAP_LINEAR, JCGLTextureFilterMagnification.TEXTURE_FILTER_LINEAR); Assert.assertTrue(t.textureCubeIsBoundAnywhere(ta)); t.textureUnitUnbind(u0); this.expected.expect(JCGLExceptionTextureNotBound.class); t.textureCubeRegenerateMipmaps(u0); } }
@Test public final void testTextureCubeRegenerateMipmapsUnbound() { final JCGLTexturesType t = this.getTextures("main"); final List<JCGLTextureUnitType> us = t.textureGetUnits(); final JCGLTextureUnitType u0 = us.get(0); final JCGLTextureCubeType ta = t.textureCubeAllocate( u0, 256L, JCGLTextureFormat.TEXTURE_FORMAT_RGBA_8_4BPP, JCGLTextureWrapR.TEXTURE_WRAP_REPEAT, JCGLTextureWrapS.TEXTURE_WRAP_REPEAT, JCGLTextureWrapT.TEXTURE_WRAP_REPEAT, JCGLTextureFilterMinification.TEXTURE_FILTER_LINEAR_MIPMAP_LINEAR, JCGLTextureFilterMagnification.TEXTURE_FILTER_LINEAR); Assert.assertTrue(t.textureCubeIsBoundAnywhere(ta)); t.textureUnitUnbind(u0); this.expected.expect(JCGLExceptionTextureNotBound.class); t.textureCubeRegenerateMipmaps(u0); } }
@Test public final void testBindError2D() { final JCGLContextType gc = this.newGL33Context("main", 24, 8); final JCGLInterfaceGL33Type g33 = gc.contextGetGL33(); final JCGLTexturesType g_tx = g33.getTextures(); final List<JCGLTextureUnitType> us = g_tx.textureGetUnits(); final JCGLTextureUnitAllocatorType alloc = this.newAllocator(2, us); final JCGLTextureUnitContextParentType c_root = alloc.getRootContext(); final JCGLTextureUnitContextType c_0 = c_root.unitContextNew(); final JCGLTextureUnitType u0 = us.get(0); final JCGLTexture2DType t0 = JCGLTextureUnitAllocatorContract.newTexture(g_tx, u0); g_tx.textureUnitUnbind(u0); c_0.unitContextFinish(g_tx); this.expected.expect(JCGLExceptionTextureUnitContextNotActive.class); c_0.unitContextBindTexture2D(g_tx, t0); }
@Test public final void testBindErrorCube() { final JCGLContextType gc = this.newGL33Context("main", 24, 8); final JCGLInterfaceGL33Type g33 = gc.contextGetGL33(); final JCGLTexturesType g_tx = g33.textures(); final List<JCGLTextureUnitType> us = g_tx.textureGetUnits(); final JCGLTextureUnitAllocatorType alloc = this.newAllocator(2, us); final JCGLTextureUnitContextParentType c_root = alloc.rootContext(); final JCGLTextureUnitContextType c_0 = c_root.unitContextNew(); final JCGLTextureUnitType u0 = us.get(0); final JCGLTextureCubeType t0 = newTextureCube(g_tx, u0); g_tx.textureUnitUnbind(u0); c_0.unitContextFinish(g_tx); this.expected.expect(JCGLExceptionTextureUnitContextNotActive.class); c_0.unitContextBindTextureCube(g_tx, t0); }
@Test public final void testBindError2D() { final JCGLContextType gc = this.newGL33Context("main", 24, 8); final JCGLInterfaceGL33Type g33 = gc.contextGetGL33(); final JCGLTexturesType g_tx = g33.textures(); final List<JCGLTextureUnitType> us = g_tx.textureGetUnits(); final JCGLTextureUnitAllocatorType alloc = this.newAllocator(2, us); final JCGLTextureUnitContextParentType c_root = alloc.rootContext(); final JCGLTextureUnitContextType c_0 = c_root.unitContextNew(); final JCGLTextureUnitType u0 = us.get(0); final JCGLTexture2DType t0 = newTexture(g_tx, u0); g_tx.textureUnitUnbind(u0); c_0.unitContextFinish(g_tx); this.expected.expect(JCGLExceptionTextureUnitContextNotActive.class); c_0.unitContextBindTexture2D(g_tx, t0); }
@Test public final void testBindErrorCube() { final JCGLContextType gc = this.newGL33Context("main", 24, 8); final JCGLInterfaceGL33Type g33 = gc.contextGetGL33(); final JCGLTexturesType g_tx = g33.getTextures(); final List<JCGLTextureUnitType> us = g_tx.textureGetUnits(); final JCGLTextureUnitAllocatorType alloc = this.newAllocator(2, us); final JCGLTextureUnitContextParentType c_root = alloc.getRootContext(); final JCGLTextureUnitContextType c_0 = c_root.unitContextNew(); final JCGLTextureUnitType u0 = us.get(0); final JCGLTextureCubeType t0 = JCGLTextureUnitAllocatorContract.newTextureCube(g_tx, u0); g_tx.textureUnitUnbind(u0); c_0.unitContextFinish(g_tx); this.expected.expect(JCGLExceptionTextureUnitContextNotActive.class); c_0.unitContextBindTextureCube(g_tx, t0); }
@Test public final void testFramebufferIsBoundDrawDeleted() { 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); g_tx.textureUnitUnbind(u0); fbb.attachDepthTexture2D(t); final JCGLFramebufferType fb = g_fb.framebufferAllocate(fbb); g_fb.framebufferDelete(fb); this.expected.expect(JCGLExceptionDeleted.class); g_fb.framebufferDrawIsBound(fb); }
@Test public final void testFramebufferIsBoundDrawDeleted() { 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); g_tx.textureUnitUnbind(u0); fbb.attachDepthTexture2D(t); final JCGLFramebufferType fb = g_fb.framebufferAllocate(fbb); g_fb.framebufferDelete(fb); this.expected.expect(JCGLExceptionDeleted.class); g_fb.framebufferDrawIsBound(fb); }
@Test public final void testFramebufferBindReadDeleted() { 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); g_tx.textureUnitUnbind(u0); fbb.attachDepthTexture2D(t); final JCGLFramebufferType fb = g_fb.framebufferAllocate(fbb); g_fb.framebufferDelete(fb); this.expected.expect(JCGLExceptionDeleted.class); g_fb.framebufferReadBind(fb); }
@Test public final void testFramebufferBindDrawDeleted() { 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); g_tx.textureUnitUnbind(u0); fbb.attachDepthTexture2D(t); final JCGLFramebufferType fb = g_fb.framebufferAllocate(fbb); g_fb.framebufferDelete(fb); this.expected.expect(JCGLExceptionDeleted.class); g_fb.framebufferDrawBind(fb); }
@Test public final void testFramebufferIsBoundReadDeleted() { 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); g_tx.textureUnitUnbind(u0); fbb.attachDepthTexture2D(t); final JCGLFramebufferType fb = g_fb.framebufferAllocate(fbb); g_fb.framebufferDelete(fb); this.expected.expect(JCGLExceptionDeleted.class); g_fb.framebufferReadIsBound(fb); }
@Test public final void testFramebufferBindDrawDeleted() { 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); g_tx.textureUnitUnbind(u0); fbb.attachDepthTexture2D(t); final JCGLFramebufferType fb = g_fb.framebufferAllocate(fbb); g_fb.framebufferDelete(fb); this.expected.expect(JCGLExceptionDeleted.class); g_fb.framebufferDrawBind(fb); }
@Test public final void testFramebufferIsBoundReadDeleted() { 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); g_tx.textureUnitUnbind(u0); fbb.attachDepthTexture2D(t); final JCGLFramebufferType fb = g_fb.framebufferAllocate(fbb); g_fb.framebufferDelete(fb); this.expected.expect(JCGLExceptionDeleted.class); g_fb.framebufferReadIsBound(fb); }
@Test public final void testFramebufferBindFeedbackTexture() { 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); g_tx.textureUnitUnbind(u0); fbb.attachDepthTexture2D(t); final JCGLFramebufferType fb = g_fb.framebufferAllocate(fbb); g_fb.framebufferDrawUnbind(); g_fb.framebufferDrawBind(fb); this.expected.expect(JCGLExceptionFeedback.class); g_tx.texture2DBind(u0, t); }