public void applyState(final StateType type, final RenderState state) { if (Constants.stats) { StatCollector.startStat(StatType.STAT_STATES_TIMER); } final RenderState tempState = getProperRenderState(type, state); final RenderContext context = ContextManager.getCurrentContext(); if (!RenderState._quickCompare.contains(type) || tempState.needsRefresh() || tempState != context.getCurrentState(type)) { doApplyState(tempState); tempState.setNeedsRefresh(false); } if (Constants.stats) { StatCollector.endStat(StatType.STAT_STATES_TIMER); } }
public RenderState applyState(final StateType type, final RenderState state) { if (Constants.stats) { StatCollector.startStat(StatType.STAT_STATES_TIMER); } final RenderState tempState = getProperRenderState(type, state); final RenderContext context = ContextManager.getCurrentContext(); if (!RenderState._quickCompare.contains(type) || tempState.needsRefresh() || tempState != context.getCurrentState(type)) { doApplyState(tempState); tempState.setNeedsRefresh(false); } if (Constants.stats) { StatCollector.endStat(StatType.STAT_STATES_TIMER); } return tempState; }