@Test public final void testDrawElementsNoIndex() { final Interfaces i = this.getInterfaces("main"); final JCGLDrawType gd = i.getDraw(); this.expected.expect(JCGLExceptionBufferNotBound.class); gd.drawElements(JCGLPrimitives.PRIMITIVE_TRIANGLES); }
@Override public <M> void onInstanceBatched( final R2MaterialOpaqueBatchedType<M> material, final R2InstanceBatchedType i) { this.shader_batched.onValidate(); this.array_objects.arrayObjectBind(i.arrayObject()); this.draw.drawElementsInstanced( JCGLPrimitives.PRIMITIVE_TRIANGLES, i.renderCount()); }
@Test public final void testDrawBadCount() { final Interfaces i = this.getInterfaces("main"); final JCGLDrawType gd = i.getDraw(); this.expected.expect(RangeCheckException.class); gd.draw(JCGLPrimitives.PRIMITIVE_TRIANGLES, 0, -1); }
@Test public final void testDrawInstancedBadCount() { final Interfaces i = this.getInterfaces("main"); final JCGLDrawType gd = i.getDraw(); this.expected.expect(RangeCheckException.class); gd.drawInstanced(JCGLPrimitives.PRIMITIVE_TRIANGLES, 0, -1, 1); }
@Test public final void testDrawInstancedBadInstances() { final Interfaces i = this.getInterfaces("main"); final JCGLDrawType gd = i.getDraw(); this.expected.expect(RangeCheckException.class); gd.drawInstanced(JCGLPrimitives.PRIMITIVE_TRIANGLES, 0, 0, -1); }
@Test public final void testDrawElementsNoIndex() { final Interfaces i = this.getInterfaces("main"); final JCGLDrawType gd = i.getDraw(); this.expected.expect(JCGLExceptionBufferNotBound.class); gd.drawElements(JCGLPrimitives.PRIMITIVE_TRIANGLES); }
@Test public final void testDrawElementsInstancedNoIndex() { final Interfaces i = this.getInterfaces("main"); final JCGLDrawType gd = i.getDraw(); this.expected.expect(JCGLExceptionBufferNotBound.class); gd.drawElementsInstanced(JCGLPrimitives.PRIMITIVE_TRIANGLES, 100); }
@Test public final void testDrawBadFirst() { final Interfaces i = this.getInterfaces("main"); final JCGLDrawType gd = i.getDraw(); this.expected.expect(RangeCheckException.class); gd.draw(JCGLPrimitives.PRIMITIVE_TRIANGLES, -1, 1); }
@Test public final void testDrawInstancedBadFirst() { final Interfaces i = this.getInterfaces("main"); final JCGLDrawType gd = i.getDraw(); this.expected.expect(RangeCheckException.class); gd.drawInstanced(JCGLPrimitives.PRIMITIVE_TRIANGLES, -1, 1, 1); }
@Override public <M> void onInstanceSingle( final R2MaterialOpaqueSingleType<M> material, final R2InstanceSingleType i) { this.matrices.withTransform( i.transform(), i.uvMatrix(), this, (mi, t) -> { final R2ShaderInstanceSingleUsableType<?> s = t.shader_single; s.onReceiveInstanceTransformValues(t.g33, mi); s.onValidate(); t.draw.drawElements(JCGLPrimitives.PRIMITIVE_TRIANGLES); return Unit.unit(); }); }
@Test public final void testDrawElementsInstancedNoIndex() { final Interfaces i = this.getInterfaces("main"); final JCGLDrawType gd = i.getDraw(); this.expected.expect(JCGLExceptionBufferNotBound.class); gd.drawElementsInstanced(JCGLPrimitives.PRIMITIVE_TRIANGLES, 100); }
@Override public <M> void onInstanceBillboarded( final R2MaterialOpaqueBillboardedType<M> material, final R2InstanceBillboardedType i) { this.shader_billboarded.onValidate(); this.array_objects.arrayObjectBind(i.arrayObject()); this.draw.draw(JCGLPrimitives.PRIMITIVE_POINTS, 0, i.enabledCount()); }
@Test public final void testDrawInstancedBadFirst() { final Interfaces i = this.getInterfaces("main"); final JCGLDrawType gd = i.getDraw(); this.expected.expect(RangeCheckException.class); gd.drawInstanced(JCGLPrimitives.PRIMITIVE_TRIANGLES, -1, 1, 1); }
g_sh.shaderUniformPutTexture2DUnit(this.texture_uniform, u0); g_ao.arrayObjectBind(this.array_object); g_d.drawElements(JCGLPrimitives.PRIMITIVE_TRIANGLES); g_ao.arrayObjectUnbind(); g_sh.shaderDeactivateProgram();
@Override public <M> void onInstanceBatched( final R2MaterialOpaqueBatchedType<M> material, final R2InstanceBatchedType i) { final R2ShaderInstanceBatchedUsableType<M> s = material.shader(); s.onValidate(); this.array_objects.arrayObjectBind(i.arrayObject()); this.draw.drawElementsInstanced( JCGLPrimitives.PRIMITIVE_TRIANGLES, i.renderCount()); }
@Test public final void testDrawBadFirst() { final Interfaces i = this.getInterfaces("main"); final JCGLDrawType gd = i.getDraw(); this.expected.expect(RangeCheckException.class); gd.draw(JCGLPrimitives.PRIMITIVE_TRIANGLES, -1, 1); }
@Test public final void testDrawInstancedBadInstances() { final Interfaces i = this.getInterfaces("main"); final JCGLDrawType gd = i.getDraw(); this.expected.expect(RangeCheckException.class); gd.drawInstanced(JCGLPrimitives.PRIMITIVE_TRIANGLES, 0, 0, -1); }
g_sh.shaderUniformPutTexture2DUnit(this.texture_uniform, u0); g_ao.arrayObjectBind(this.array_object); g_d.drawElements(JCGLPrimitives.PRIMITIVE_TRIANGLES); g_ao.arrayObjectUnbind(); g_sh.shaderDeactivateProgram();
@Override public <M> void onInstanceBatched( final R2MaterialDepthBatchedType<M> material, final R2InstanceBatchedType i) { material.shader().onValidate(); this.array_objects.arrayObjectBind(i.arrayObject()); this.draw.drawElementsInstanced( JCGLPrimitives.PRIMITIVE_TRIANGLES, i.renderCount()); }
@Test public final void testDrawBadCount() { final Interfaces i = this.getInterfaces("main"); final JCGLDrawType gd = i.getDraw(); this.expected.expect(RangeCheckException.class); gd.draw(JCGLPrimitives.PRIMITIVE_TRIANGLES, 0, -1); }