1. Jason McKesson
  2. gltut

Source

gltut / Documents / sceneFormat.rnc

Diff from to

File Documents/sceneFormat.rnc

  • Ignore whitespace
         element scn:node { sc.node.content }
         
     sc.node.content =
-        sc.node.attlist, (sc.note | sc.node.texture)*
+        sc.node.attlist, (sc.note | sc.node.texture | sc.node.variant)*
         
     sc.note =
         ##User-defined strings that can be queried.
         
     sc.node.texture.content =
         sc.node.texture.attlist
+        
+    sc.node.variant =
+        element scn:variant { sc.node.variant.content }
+        
+    sc.node.variant.content =
+        sc.node.variant.attlist, sc.node.texture*
+       
 }
 
 ##Attributes
     sc.node.attlist =
         sc.node.name.attribute,
         sc.node.mesh.attribute,
-        sc.node.prog.attribute,
+        sc.node.prog.attribute?,
         sc.node.pos.attribute,
         sc.node.orient.attribute?,
         sc.node.scale.attribute?
         sc.node.texture.name.attribute,
         sc.node.texture.unit.attribute,
         sc.node.texture.sampler.attribute
+        
+    sc.node.variant.attlist =
+        sc.variant.name.attribute,
+        (sc.node.prog.attribute | sc.variant.base.attribute)
     
     sc.xml.id.attribute =
         ##Uniquely named object
     sc.node.texture.sampler.attribute =
         ##The sample filtering to use for this texture.
         attribute sampler { acc.samplers.type }
+        
+    sc.variant.name.attribute =
+        ##The name of a variant node.
+        attribute name { text }
+        
+    sc.variant.base.attribute =
+        ##The presence of this attribute means that the default variant should be used.
+        attribute base { empty }
 }
 
 ## Accessories