@Test public final void testTexture2DRegenerateMipmapsNoOp() { 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, JCGLTextureFilterMagnification.TEXTURE_FILTER_LINEAR); Assert.assertTrue(t.texture2DIsBoundAnywhere(ta)); t.texture2DRegenerateMipmaps(u0); }
@Test public final void testTexture2DRegenerateMipmapsOK() { 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.texture2DRegenerateMipmaps(u0); }
@Test public final void testTexture2DRegenerateMipmapsNoOp() { 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, JCGLTextureFilterMagnification.TEXTURE_FILTER_LINEAR); Assert.assertTrue(t.texture2DIsBoundAnywhere(ta)); t.texture2DRegenerateMipmaps(u0); }
@Test public final void testTexture2DRegenerateMipmapsOK() { 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.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 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 testTexture2DDeleteUnbinds() { final JCGLTexturesType t = this.getTextures("main"); final List<JCGLTextureUnitType> us = t.textureGetUnits(); final JCGLTextureUnitType u = us.get(0); final JCGLTexture2DType ta = t.texture2DAllocate( u, 128L, 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.textureUnitIsBound(u)); Assert.assertTrue(t.texture2DIsBound(u, ta)); Assert.assertTrue(t.texture2DIsBoundAnywhere(ta)); t.texture2DDelete(ta); Assert.assertTrue(ta.isDeleted()); Assert.assertFalse(t.textureUnitIsBound(u)); }
@Test public final void testTexture2DDeleteUnbinds() { final JCGLTexturesType t = this.getTextures("main"); final List<JCGLTextureUnitType> us = t.textureGetUnits(); final JCGLTextureUnitType u = us.get(0); final JCGLTexture2DType ta = t.texture2DAllocate( u, 128L, 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.textureUnitIsBound(u)); Assert.assertTrue(t.texture2DIsBound(u, ta)); Assert.assertTrue(t.texture2DIsBoundAnywhere(ta)); t.texture2DDelete(ta); Assert.assertTrue(ta.isDeleted()); Assert.assertFalse(t.textureUnitIsBound(u)); }
JCGLTextureFilterMinification.TEXTURE_FILTER_LINEAR_MIPMAP_LINEAR, JCGLTextureFilterMagnification.TEXTURE_FILTER_LINEAR); Assert.assertTrue(t.texture2DIsBoundAnywhere(ta)); Assert.assertFalse(t.texture2DIsBoundAnywhere(ta)); Assert.assertFalse(t.texture2DIsBound(u0, ta)); Assert.assertFalse(t.textureUnitIsBound(u0)); Assert.assertTrue(t.texture2DIsBoundAnywhere(ta)); Assert.assertFalse(t.texture2DIsBound(u0, ta)); Assert.assertFalse(t.textureUnitIsBound(u0)); Assert.assertTrue(t.texture2DIsBoundAnywhere(ta)); Assert.assertTrue(t.texture2DIsBound(u0, ta)); Assert.assertTrue(t.textureUnitIsBound(u0)); Assert.assertTrue(t.texture2DIsBoundAnywhere(ta)); Assert.assertFalse(t.texture2DIsBound(u0, ta)); Assert.assertFalse(t.textureUnitIsBound(u0)); Assert.assertFalse(t.texture2DIsBoundAnywhere(ta)); Assert.assertFalse(t.texture2DIsBound(u0, ta)); Assert.assertFalse(t.textureUnitIsBound(u0));
JCGLTextureFilterMinification.TEXTURE_FILTER_LINEAR_MIPMAP_LINEAR, JCGLTextureFilterMagnification.TEXTURE_FILTER_LINEAR); Assert.assertTrue(t.texture2DIsBoundAnywhere(ta)); Assert.assertFalse(t.texture2DIsBoundAnywhere(ta)); Assert.assertFalse(t.texture2DIsBound(u0, ta)); Assert.assertFalse(t.textureUnitIsBound(u0)); Assert.assertTrue(t.texture2DIsBoundAnywhere(ta)); Assert.assertFalse(t.texture2DIsBound(u0, ta)); Assert.assertFalse(t.textureUnitIsBound(u0)); Assert.assertTrue(t.texture2DIsBoundAnywhere(ta)); Assert.assertTrue(t.texture2DIsBound(u0, ta)); Assert.assertTrue(t.textureUnitIsBound(u0)); Assert.assertTrue(t.texture2DIsBoundAnywhere(ta)); Assert.assertFalse(t.texture2DIsBound(u0, ta)); Assert.assertFalse(t.textureUnitIsBound(u0)); Assert.assertFalse(t.texture2DIsBoundAnywhere(ta)); Assert.assertFalse(t.texture2DIsBound(u0, ta)); Assert.assertFalse(t.textureUnitIsBound(u0));
Assert.assertFalse(t.textureUnitIsBound(u0)); Assert.assertFalse(t.texture2DIsBound(u0, ta)); Assert.assertFalse(t.texture2DIsBoundAnywhere(ta)); Assert.assertFalse(t.textureCubeIsBound(u0, tb)); Assert.assertFalse(t.textureCubeIsBoundAnywhere(tb)); Assert.assertTrue(t.textureUnitIsBound(u0)); Assert.assertTrue(t.texture2DIsBound(u0, ta)); Assert.assertTrue(t.texture2DIsBoundAnywhere(ta)); Assert.assertFalse(t.textureCubeIsBound(u0, tb)); Assert.assertFalse(t.textureCubeIsBoundAnywhere(tb)); Assert.assertTrue(t.textureUnitIsBound(u0)); Assert.assertFalse(t.texture2DIsBound(u0, ta)); Assert.assertFalse(t.texture2DIsBoundAnywhere(ta)); Assert.assertTrue(t.textureCubeIsBound(u0, tb)); Assert.assertTrue(t.textureCubeIsBoundAnywhere(tb));
Assert.assertFalse(t.textureUnitIsBound(u0)); Assert.assertFalse(t.texture2DIsBound(u0, ta)); Assert.assertFalse(t.texture2DIsBoundAnywhere(ta)); Assert.assertFalse(t.textureCubeIsBound(u0, tb)); Assert.assertFalse(t.textureCubeIsBoundAnywhere(tb)); Assert.assertTrue(t.textureUnitIsBound(u0)); Assert.assertTrue(t.texture2DIsBound(u0, ta)); Assert.assertTrue(t.texture2DIsBoundAnywhere(ta)); Assert.assertFalse(t.textureCubeIsBound(u0, tb)); Assert.assertFalse(t.textureCubeIsBoundAnywhere(tb)); Assert.assertTrue(t.textureUnitIsBound(u0)); Assert.assertFalse(t.texture2DIsBound(u0, ta)); Assert.assertFalse(t.texture2DIsBoundAnywhere(ta)); Assert.assertTrue(t.textureCubeIsBound(u0, tb)); Assert.assertTrue(t.textureCubeIsBoundAnywhere(tb));