@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 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); }
g_fb.framebufferDrawBind(fb_draw); g_fb.framebufferBlit( area,
@Test public final void testFramebufferBindFeedback() { 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_tx.texture2DBind(u0, t); this.expected.expect(JCGLExceptionFeedback.class); g_fb.framebufferDrawBind(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); }
@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); }
@Test public final void testFramebufferBindFeedback() { 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_tx.texture2DBind(u0, t); this.expected.expect(JCGLExceptionFeedback.class); g_fb.framebufferDrawBind(fb); }
g_fb.framebufferDrawBind(fb_draw); g_fb.framebufferBlit( area,
Assert.assertFalse(g_fb.framebufferReadAnyIsBound()); g_fb.framebufferDrawBind(fb); g_fb.framebufferReadBind(fb);
@Override public void renderDepthVariance( final R2DepthVarianceBufferUsableType dbuffer, final JCGLTextureUnitContextParentType uc, final R2MatricesObserverType m, final R2DepthInstancesType s) { NullCheck.notNull(dbuffer); NullCheck.notNull(uc); NullCheck.notNull(m); NullCheck.notNull(s); Preconditions.checkPrecondition( !this.isDeleted(), "Renderer must not be deleted"); final JCGLFramebufferUsableType gb_fb = dbuffer.primaryFramebuffer(); final JCGLFramebuffersType g_fb = this.g.getFramebuffers(); try { g_fb.framebufferDrawBind(gb_fb); this.renderDepthVarianceWithBoundBuffer(dbuffer.area(), uc, m, s); } finally { g_fb.framebufferDrawUnbind(); } }
@Override public void renderDepth( final R2DepthOnlyBufferUsableType dbuffer, final JCGLTextureUnitContextParentType uc, final R2MatricesObserverType m, final R2DepthInstancesType s) { NullCheck.notNull(dbuffer); NullCheck.notNull(uc); NullCheck.notNull(m); NullCheck.notNull(s); Preconditions.checkPrecondition( !this.isDeleted(), "Renderer must not be deleted"); final JCGLFramebufferUsableType gb_fb = dbuffer.primaryFramebuffer(); final JCGLFramebuffersType g_fb = this.g.getFramebuffers(); try { g_fb.framebufferDrawBind(gb_fb); this.renderDepthWithBoundBuffer(dbuffer.area(), uc, m, s); } finally { g_fb.framebufferDrawUnbind(); } }
NullCheck.notNull(this.program.getUniforms().get("data")); gf.framebufferDrawBind(this.framebuffer); gs.shaderActivateProgram(this.program); gs.shaderUniformPutVector4f(u_data, x);
final R2LightBufferUsableType lb = lbuffer.get(); final JCGLFramebuffersType g_fb = this.g.getFramebuffers(); g_fb.framebufferDrawBind(lb.primaryFramebuffer());
Assert.assertFalse(g_fb.framebufferDrawIsBound(fb)); g_fb.framebufferDrawBind(fb); Assert.assertEquals(Optional.of(fb), g_fb.framebufferDrawGetBound()); Assert.assertTrue(g_fb.framebufferDrawAnyIsBound());
NullCheck.notNull(this.program.uniforms().get("data[0]"), "Uniform"); gf.framebufferDrawBind(this.framebuffer); gs.shaderActivateProgram(this.program); gs.shaderUniformPutVectorf(u_data, x);
NullCheck.notNull(this.program.uniforms().get("data"), "Uniform"); gf.framebufferDrawBind(this.framebuffer); gs.shaderActivateProgram(this.program); gs.shaderUniformPutVector4f(u_data, x);
NullCheck.notNull(this.program.getUniforms().get("data[0]")); gf.framebufferDrawBind(this.framebuffer); gs.shaderActivateProgram(this.program); gs.shaderUniformPutVectorf(u_data, x);
Assert.assertFalse(g_fb.framebufferDrawIsBound(fb)); g_fb.framebufferDrawBind(fb); Assert.assertEquals(Optional.of(fb), g_fb.framebufferDrawGetBound()); Assert.assertTrue(g_fb.framebufferDrawAnyIsBound());
g_fb.framebufferDrawBind(dbuffer_fb); t.depth_buffer.clearBoundPrimaryFramebuffer(t.g33); t.depth_variance_renderer.renderDepthVarianceWithBoundBuffer(
g_fb.framebufferDrawBind(dbuffer_fb); this.dbuffer.clearBoundPrimaryFramebuffer(t.g33); t.depth_renderer.renderDepthWithBoundBuffer(