public void renderViewPortQueues(ViewPort vp, boolean flush) {
        RenderQueue rq = vp.getQueue();
        Camera cam = vp.getCamera();
        boolean depthRangeChanged = false;

        // render opaque objects with default depth range
        // opaque objects are sorted front-to-back, reducing overdraw
        if (prof != null) {
            prof.vpStep(VpStep.RenderBucket, vp, Bucket.Opaque);
        }
        rq.renderQueue(Bucket.Opaque, this, cam, flush);

        // render the sky, with depth range set to the farthest
        if (!rq.isQueueEmpty(Bucket.Sky)) {
            if (prof != null) {
                prof.vpStep(VpStep.RenderBucket, vp, Bucket.Sky);
            }
            renderer.setDepthRange(1, 1);
            rq.renderQueue(Bucket.Sky, this, cam, flush);
            depthRangeChanged = true;
        }


        // transparent objects are last because they require blending with the
        // rest of the scene's objects. Consequently, they are sorted
        // back-to-front.
        if (!rq.isQueueEmpty(Bucket.Transparent)) {
            if (prof != null) {
                prof.vpStep(VpStep.RenderBucket, vp, Bucket.Transparent);
            }
            if (depthRangeChanged) {
                renderer.setDepthRange(0, 1);
                depthRangeChanged = false;
            }
            rq.renderQueue(Bucket.Transparent, this, cam, flush);
        }

        if (!rq.isQueueEmpty(Bucket.Gui)) {
            if (prof != null) {
                prof.vpStep(VpStep.RenderBucket, vp, Bucket.Gui);
            }
            renderer.setDepthRange(0, 0);
            setCamera(cam, true);
            rq.renderQueue(Bucket.Gui, this, cam, flush);
            setCamera(cam, false);
            depthRangeChanged = true;
        }

        // restore range to default
        if (depthRangeChanged) {
            renderer.setDepthRange(0, 1);
        }
    }
Renders the given viewport queues.

<p>Changes the {@link Renderer#setDepthRange(float, float) depth range}
appropriately as expected by each queue and then calls
{@link RenderQueue#renderQueue(com.jme3.renderer.queue.RenderQueue.Bucket,
com.jme3.renderer.RenderManager, com.jme3.renderer.Camera, boolean) }
on the queue. Makes sure to restore the depth range to [0, 1]
at the end of the call.
Note that the {@link Bucket#Translucent translucent bucket} is NOT
rendered by this method. Instead, the user should call
{@link #renderTranslucentQueue(com.jme3.renderer.ViewPort) }
after this call.

@param vp the viewport of which queue should be rendered
@param flush If true, the queues will be cleared after
    rendering.

@see RenderQueue
@see #renderTranslucentQueue(com.jme3.renderer.ViewPort)
jme3-core/src/main/java/com/jme3/renderer/RenderManager.java