public static void apply(final LwjglRenderer renderer, final WireframeState state) { // ask for the current state record final RenderContext context = ContextManager.getCurrentContext(); final WireframeStateRecord record = (WireframeStateRecord) context.getStateRecord(StateType.Wireframe); context.setCurrentState(StateType.Wireframe, state); if (state.isEnabled()) { renderer.setupLineParameters(state.getLineWidth(), 1, (short) 0xFFFF, state.isAntialiased()); switch (state.getFace()) { case Front: applyPolyMode(GL11.GL_LINE, GL11.GL_FILL, record); break; case Back: applyPolyMode(GL11.GL_FILL, GL11.GL_LINE, record); break; case FrontAndBack: default: applyPolyMode(GL11.GL_LINE, GL11.GL_LINE, record); break; } } else { applyPolyMode(GL11.GL_FILL, GL11.GL_FILL, record); } if (!record.isValid()) { record.validate(); } }
public static void apply(final JoglRenderer renderer, final WireframeState state) { // ask for the current state record final RenderContext context = ContextManager.getCurrentContext(); final WireframeStateRecord record = (WireframeStateRecord) context.getStateRecord(StateType.Wireframe); context.setCurrentState(StateType.Wireframe, state); if (state.isEnabled()) { renderer.setupLineParameters(state.getLineWidth(), 1, (short) 0xFFFF, state.isAntialiased()); switch (state.getFace()) { case Front: applyPolyMode(GL2GL3.GL_LINE, GL2GL3.GL_FILL, record); break; case Back: applyPolyMode(GL2GL3.GL_FILL, GL2GL3.GL_LINE, record); break; case FrontAndBack: default: applyPolyMode(GL2GL3.GL_LINE, GL2GL3.GL_LINE, record); break; } } else { applyPolyMode(GL2GL3.GL_FILL, GL2GL3.GL_FILL, record); } if (!record.isValid()) { record.validate(); } }
public static void apply(final Lwjgl3Renderer renderer, final WireframeState state) { // ask for the current state record final RenderContext context = ContextManager.getCurrentContext(); final WireframeStateRecord record = (WireframeStateRecord) context.getStateRecord(StateType.Wireframe); context.setCurrentState(StateType.Wireframe, state); if (state.isEnabled()) { renderer.setupLineParameters(state.getLineWidth(), state.isAntialiased()); switch (state.getFace()) { case Front: applyPolyMode(GL11C.GL_LINE, GL11C.GL_FILL, record); break; case Back: applyPolyMode(GL11C.GL_FILL, GL11C.GL_LINE, record); break; case FrontAndBack: default: applyPolyMode(GL11C.GL_LINE, GL11C.GL_LINE, record); break; } } else { applyPolyMode(GL11C.GL_FILL, GL11C.GL_FILL, record); } if (!record.isValid()) { record.validate(); } }