Game Development Reference
In-Depth Information
How it works...
The reason sky boxes work is because of how the rendering of the scenegraph happens.
Objects can be sorted into different lists or buckets, to help the rendered in drawing. A sky
box is sorted into the
Bucket.Sky
list, which is drawn first in every rendering cycle.
This is why everything else (normally in the
Bucket.Opaque
list) appears to be in front
of it. You can achieve the same effect for any object by calling
Geo-
metry.setQueueBucket (Bucket.Sky)
.
Tip
You can achieve the same effect on other objects by changing the
QueueBucket
render-
ers as follows:
Geometry.setQueueBucket(Bucket.Sky);