private static void configureCulling( final JCGLInterfaceGL33Type g, final JCGLRenderStateType r) { final JCGLCullingType g_c = g.culling(); final Optional<JCGLCullingStateType> cull_opt = r.cullingState(); if (cull_opt.isPresent()) { final JCGLCullingStateType cull_state = cull_opt.get(); g_c.cullingEnable( cull_state.faceSelection(), cull_state.faceWindingOrder()); } else { g_c.cullingDisable(); } }
@Test public final void testCullingIdentities() { final JCGLCullingType g_c = this.getCulling("main"); Assert.assertFalse(g_c.cullingIsEnabled()); for (final JCGLFaceSelection s : JCGLFaceSelection.values()) { for (final JCGLFaceWindingOrder w : JCGLFaceWindingOrder.values()) { g_c.cullingEnable(s, w); Assert.assertTrue(g_c.cullingIsEnabled()); g_c.cullingDisable(); Assert.assertFalse(g_c.cullingIsEnabled()); } } } }
@Test public final void testCullingIdentities() { final JCGLCullingType g_c = this.getCulling("main"); Assert.assertFalse(g_c.cullingIsEnabled()); for (final JCGLFaceSelection s : JCGLFaceSelection.values()) { for (final JCGLFaceWindingOrder w : JCGLFaceWindingOrder.values()) { g_c.cullingEnable(s, w); Assert.assertTrue(g_c.cullingIsEnabled()); g_c.cullingDisable(); Assert.assertFalse(g_c.cullingIsEnabled()); } } } }
g_cu.cullingEnable( JCGLFaceSelection.FACE_BACK, JCGLFaceWindingOrder.FRONT_FACE_COUNTER_CLOCKWISE);