@Test public final void testIdentities() { final JCGLPolygonModesType g_p = this.getPolygonModes("main"); Assert.assertEquals(JCGLPolygonMode.POLYGON_FILL, g_p.polygonGetMode()); for (final JCGLPolygonMode v : JCGLPolygonMode.values()) { g_p.polygonSetMode(v); Assert.assertEquals(v, g_p.polygonGetMode()); } } }
private static void configurePolygonMode( final JCGLInterfaceGL33Type g, final JCGLRenderStateType r) { g.polygonModes().polygonSetMode(r.polygonMode()); }
@Test public final void testPolygonMode() { final JCGLInterfaceGL33Type g = this.getGL33("main", 24, 8); final JCGLRenderStateMutable r = JCGLRenderStateMutable.create(); r.setPolygonMode(JCGLPolygonMode.POLYGON_LINES); JCGLRenderStates.activate(g, r); final JCGLPolygonModesType g_p = g.getPolygonModes(); Assert.assertEquals(JCGLPolygonMode.POLYGON_LINES, g_p.polygonGetMode()); }
@Test public final void testPolygonMode() { final JCGLInterfaceGL33Type g = this.getGL33("main", 24, 8); final JCGLRenderStateMutable r = JCGLRenderStateMutable.create(); r.setPolygonMode(JCGLPolygonMode.POLYGON_LINES); JCGLRenderStates.activate(g, r); final JCGLPolygonModesType g_p = g.polygonModes(); Assert.assertEquals(JCGLPolygonMode.POLYGON_LINES, g_p.polygonGetMode()); }
@Test public final void testIdentities() { final JCGLPolygonModesType g_p = this.getPolygonModes("main"); Assert.assertEquals(JCGLPolygonMode.POLYGON_FILL, g_p.polygonGetMode()); for (final JCGLPolygonMode v : JCGLPolygonMode.values()) { g_p.polygonSetMode(v); Assert.assertEquals(v, g_p.polygonGetMode()); } } }
@Test public final void testInitialState() { final JCGLInterfaceGL33Type g = this.getGL33("main", 24, 8); final JCGLRenderStateMutable r = JCGLRenderStateMutable.create(); JCGLRenderStates.activate(g, r); final JCGLBlendingType g_b = g.getBlending(); final JCGLCullingType g_c = g.getCulling(); final JCGLDepthBuffersType g_d = g.getDepthBuffers(); final JCGLColorBufferMaskingType g_cm = g.getColorBufferMasking(); final JCGLPolygonModesType g_p = g.getPolygonModes(); final JCGLScissorType g_s = g.getScissor(); Assert.assertFalse(g_b.blendingIsEnabled()); Assert.assertFalse(g_c.cullingIsEnabled()); Assert.assertTrue(g_cm.colorBufferMaskStatusRed()); Assert.assertTrue(g_cm.colorBufferMaskStatusGreen()); Assert.assertTrue(g_cm.colorBufferMaskStatusBlue()); Assert.assertTrue(g_cm.colorBufferMaskStatusAlpha()); Assert.assertFalse(g_d.depthBufferTestIsEnabled()); Assert.assertFalse(g_d.depthBufferWriteIsEnabled()); Assert.assertFalse(g_d.depthClampingIsEnabled()); Assert.assertEquals(JCGLPolygonMode.POLYGON_FILL, g_p.polygonGetMode()); Assert.assertFalse(g_s.scissorIsEnabled()); }
@Test public final void testInitialState() { final JCGLInterfaceGL33Type g = this.getGL33("main", 24, 8); final JCGLRenderStateMutable r = JCGLRenderStateMutable.create(); JCGLRenderStates.activate(g, r); final JCGLBlendingType g_b = g.blending(); final JCGLCullingType g_c = g.culling(); final JCGLDepthBuffersType g_d = g.depthBuffers(); final JCGLColorBufferMaskingType g_cm = g.colorBufferMasking(); final JCGLPolygonModesType g_p = g.polygonModes(); final JCGLScissorType g_s = g.scissor(); Assert.assertFalse(g_b.blendingIsEnabled()); Assert.assertFalse(g_c.cullingIsEnabled()); Assert.assertTrue(g_cm.colorBufferMaskStatusRed()); Assert.assertTrue(g_cm.colorBufferMaskStatusGreen()); Assert.assertTrue(g_cm.colorBufferMaskStatusBlue()); Assert.assertTrue(g_cm.colorBufferMaskStatusAlpha()); Assert.assertFalse(g_d.depthBufferTestIsEnabled()); Assert.assertFalse(g_d.depthBufferWriteIsEnabled()); Assert.assertFalse(g_d.depthClampingIsEnabled()); Assert.assertEquals(JCGLPolygonMode.POLYGON_FILL, g_p.polygonGetMode()); Assert.assertFalse(g_s.scissorIsEnabled()); }