if (oldState != null) obj.setRenderState(oldState); else obj.clearRenderState(RenderState.RS_CULL);
    private void renderTransparentBucket() {        transparentBucket.sort();	        for (int i = 0; i < transparentBucket.listSize; i++) {                Spatial obj = transparentBucket.list[i];                 RenderState oldState = transparentBucket.list[i].setRenderState(tranCull);                // Only do twopass if true and the current set state is either null or CS_NONE.	            if (twoPassTransparent && (oldState == null || ((CullState)oldState).getCullMode() == CullState.CS_NONE)) {	                // apply our cullstate change	                obj.updateRenderState();  // FIXME: We should change this to only update CULL STATE	                // first render back-facing tris only	                tranCull.setCullMode(CullState.CS_FRONT);	                obj.draw(renderer);	                // then render front-facing tris only	                tranCull.setCullMode(CullState.CS_BACK);	                obj.draw(renderer);	                // revert back, we also need to updateRenderState	                if (oldState != null)	                    obj.setRenderState(oldState);	                else			            obj.clearRenderState(RenderState.RS_CULL);	                	                obj.updateRenderState();  // FIXME: We should change this to only update CULL STATE	            } else {	                // revert back, no need to updateRenderState	                if (oldState != null)	                    obj.setRenderState(oldState);	                else			            obj.clearRenderState(RenderState.RS_CULL);	                // draw as usual	                obj.draw(renderer);	            }                obj.queueDistance = Float.NEGATIVE_INFINITY;	        }        transparentBucket.clear();    }