com.jme.renderer
Class RenderQueue

java.lang.Object
  extended bycom.jme.renderer.RenderQueue

public class RenderQueue
extends java.lang.Object

This optional class supports queueing of rendering states that are drawn when displayBackBuffer is called on the renderer. All spatials in the opaque bucket are rendered first in order closest to farthest. Then all spatials in the opaque bucket are rendered in order farthest to closest. Finally all spatials in the ortho bucket are rendered in ortho mode from highest to lowest Z order. As a user, you shouldn't need to use this class directly. All you'll need to do is call Spatial.setRenderQueueMode .

Author:
renanse, Jack Lindamood (javadoc + SpatialList only)
See Also:
Spatial.setRenderQueueMode(int)

Constructor Summary
RenderQueue(Renderer r)
          Creates a new render queue that will work with the given renderer.
 
Method Summary
 void addToQueue(Spatial s, int bucket)
          Add a given Spatial to the RenderQueue.
 void renderBuckets()
          Renders the opaque, clone, transparent, and ortho buckets in that order.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RenderQueue

public RenderQueue(Renderer r)
Creates a new render queue that will work with the given renderer.

Parameters:
r -
Method Detail

addToQueue

public void addToQueue(Spatial s,
                       int bucket)
Add a given Spatial to the RenderQueue. This is how jME adds data tothe render queue. As a user, in 99% of casees you'll want to use the function Spatail.setRenderQueueMode and let jME add the item to the queue itself.

Parameters:
s - Spatial to add.
bucket - A bucket type to add to.
See Also:
Spatial.setRenderQueueMode(int), Renderer.QUEUE_OPAQUE, Renderer.QUEUE_ORTHO, Renderer.QUEUE_TRANSPARENT

renderBuckets

public void renderBuckets()
Renders the opaque, clone, transparent, and ortho buckets in that order.