Source

gltut / Documents / meshFormat.rnc

Diff from to

Documents/meshFormat.rnc

         element msh:mesh {mf.mesh.content}
 
     mf.mesh.content =
-        mf.attribute+, mf.rendering-commands+
+        mf.attribute+, mf.vao*, mf.rendering-commands+
         
     mf.attribute =
         ##A single attribute array. It can contain any kind of attribute data.
         
     mf.attribute.content =
         mf.attribute.attlist, text
+    
+    mf.vao =
+        ##These are named VAOs, which represent collections of attributes that can be used to render
+        ##the mesh.
+        element msh:vao { mf.vao.content }
         
+    mf.vao.content =
+        mf.vao.attlist, mf.source+
+        
+    mf.source =
+        ##This represents one of the attributes used by the VAO.
+        element msh:source { mf.source.content }
+        
+    mf.source.content =
+        mf.source.attlist
+    
     mf.rendering-commands =
         ##These are the possible commands for rendering this mesh.
         (mf.indices | mf.arrays)
     mf.attribute.attlist =
         mf.attribute.index.attribute, mf.attribute.integral.attribute?, mf.attribute.type.attribute, mf.attribute.size.attribute
         
+    mf.vao.attlist =
+        mf.vao.name.attribute
+
+    mf.source.attlist =
+        mf.source.attrib.attribute
+
     mf.indices.attlist =
         mf.indices.type.attribute, mf.cmd.attribute, mf.indices.primrestart.attribute?
         
         
     mf.attribute.index.attribute =
         ##The attribute index to be used for this vertex attribute.
-        attribute index { xsd:nonNegativeInteger { minInclusive = "0" maxExclusive = "16"} }
+        attribute index { acc.attribute.type }
         
     mf.attribute.size.attribute =
         ##The number of components in this vertex attribute. 1-4.
         ##True if this attribute is to be passed as an integral attribute.
         ##Defaults to false.
         attribute integral {"true"|"false"}
-        
+
+    mf.vao.name.attribute =
+        attribute name { text }
+    
+    mf.source.attrib.attribute =
+        attribute attrib { acc.attribute.type }
+
     mf.cmd.attribute =
         ##The primitive type used to render with this rendering command..
         attribute cmd { "triangles" | "tri-strip" | "tri-fan" | "lines" | "line-strip" |
         attribute count { xsd:positiveInteger }
 }
 
+## Accessories
+div
+{
+    acc.attribute.type =
+        xsd:nonNegativeInteger { minInclusive = "0" maxExclusive = "16"}
+}
+
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.