]> git.mxchange.org Git - simgear.git/blobdiff - simgear/scene/util/RenderConstants.hxx
Work around apparent OSG 3.2.0 normal binding bug.
[simgear.git] / simgear / scene / util / RenderConstants.hxx
index 54e4f0756d9cbd763dd94144fec8366478f251a6..eec6ac952bfe3a7a3956426402562e253b07712d 100644 (file)
@@ -38,13 +38,24 @@ enum NodeMask {
     GROUNDLIGHTS2_BIT = (1 << 9),
     RUNWAYLIGHTS_BIT = (1 << 10),
     LIGHTS_BITS = (GROUNDLIGHTS0_BIT | GROUNDLIGHTS1_BIT | GROUNDLIGHTS2_BIT
-                   | RUNWAYLIGHTS_BIT)
+                   | RUNWAYLIGHTS_BIT),
+    // Sky parts
+    BACKGROUND_BIT = (1 << 11),
+    // Everything else that isn't terrain. Initially for clouds;
+    // eventually for other models?
+    MODEL_BIT = (1 << 12),
+    MODELLIGHT_BIT = (1 << 13),
+    PERMANENTLIGHT_BIT = (1 << 14)
 };
 
 // Theory of bin numbering:
 //
 // Normal opaque objects are assigned bin 0.
 //
+// Random objects like trees may have transparency, but there are too
+// many to depth sort individually. By drawing them after the terrain
+// we can at least keep the sky under the ground from poking through.
+//
 // Point lights blend with the terrain to simulate attenuation but
 // should completely obscure any transparent geometry behind
 // them. Also, they should be visible through semi-transparent cloud
@@ -57,6 +68,7 @@ enum NodeMask {
 // OSG and its file loaders throw all transparent objects into bin 10.
 
 enum RenderBin {
+    RANDOM_OBJECTS_BIN = 2,
     POINT_LIGHTS_BIN = 8,
     CLOUDS_BIN = 9,
     TRANSPARENT_BIN = 10        // assigned by OSG