home *** CD-ROM | disk | FTP | other *** search
/ Xentax forum attachments archive / xentax.7z / 5257 / source.7z / x_pssg.txt < prev    next >
Encoding:
Text File  |  2012-03-05  |  3.5 KB  |  153 lines

  1. HEADER
  2. ------
  3.  
  4.  The first 16 bytes is the PSSG header. It has the following structure:
  5.  
  6.  PSSG (4 bytes)
  7.  PSSG chunksize (4 bytes)
  8.  number of parameters + 1 (4 bytes)
  9.  number of properties (4 bytes)
  10.  
  11.  A parameter represents a node in the PSSG scenegraph. For example, the first
  12.  parameter is usually a PSSGDATABASE.
  13.  
  14.  Each parameter may have 0 to N properties. For example, the PSSGDATABASE
  15.  parameter typically has the following properties:
  16.    creator
  17.    creationMachine
  18.    creationDate
  19.    scale
  20.    up
  21.    
  22. PARAMETER LIST
  23. --------------
  24.  
  25.  Following the header is a list of parameters and properties. The number of
  26.  parameters to read is specified in the header. Each parameter has the
  27.  following structure.
  28.  
  29.  parameter index       (4 bytes)
  30.  parameter name length (4 bytes)
  31.  parameter name        (parameter name length bytes)
  32.  number of properties  (4 bytes)
  33.  for(i = 0; i < number of properties; i++) {
  34.      property index       (4 bytes)
  35.      property name length (4 bytes)
  36.      property name        (property name length bytes)
  37.     }
  38.     
  39. CHUNK LIST
  40. ----------
  41.  
  42. PSSGDATABASE
  43. ------------
  44.  
  45.  parameter index   (4 bytes)
  46.  chunksize         (4 bytes)
  47.  property bytes    (4 bytes)
  48.  property data     (property bytes)
  49.  list of subchunks
  50.  
  51. DATABLOCK
  52. ---------
  53.  
  54.  Properties:
  55.   uint32 streamCount        (number of DATASTREAM nodes, usually 1)
  56.   uint32 size               (size of data in DATABLOCKDATA)
  57.   elementCount              (number of items, i.e. number of vertices)
  58.   uint32 allocationStrategy (not important)
  59.   string id                 (identifier)
  60.  
  61.  Notes:
  62.   Even though there is a streamCount parameter, in every case I've seen so far,
  63.   streamCount is always 1 and a DATABLOCK always contains 1 DATABLOCKSTREAM as
  64.   the first child followed by 1 DATABLOCKDATA as the next child.
  65.   
  66.   In a LIBRARY node, if there are 6 data blocks,
  67.  
  68.  DATABLOCK
  69.   * DATABLOCKSTREAM
  70.   * DATABLOCKDATA
  71.  
  72. DATABLOCKSTREAM
  73. ---------------
  74.  
  75.  string renderType (indicates type of vertex map, UV, normal, position)
  76.  string dataType   (float2, float3, half2, etc.)
  77.  uint32 offset
  78.  uint32 stride
  79.  
  80. RENDERDATASOURCE
  81. ----------------
  82.  
  83.  Properties:
  84.   uint32    streamCount;
  85.   string    primitive;
  86.   string    id;
  87.  
  88.  Notes:
  89.   The first RENDERDATASOURCE has streamCount + 1 children, with the first child
  90.   being a RENDERINDEXSOURCE followed by streamCount RENDERSTREAM nodes. Following
  91.   RENDERDATASOURCE nodes have streamCount nodes, with no RENDERINDEXSOURCE node.
  92.     
  93.  RENDERDATASOURCE
  94.   * RENDERINDEXSOURCE
  95.   * RENDERSTREAM
  96.   * RENDERSTREAM
  97.   * RENDERSTREAM
  98.   * ...
  99.  RENDERDATASOURCE
  100.   * RENDERSTREAM
  101.   * RENDERSTREAM
  102.   * RENDERSTREAM
  103.   * ...
  104.  RENDERDATASOURCE
  105.   * RENDERSTREAM
  106.   * RENDERSTREAM
  107.   * RENDERSTREAM
  108.   * ...
  109.   
  110. RENDERINDEXSOURCE
  111. -----------------
  112.  
  113.  Properties:
  114.   string    primitive;
  115.   string    format;
  116.   uint32    count;
  117.   uint32    maximumIndex;
  118.   uint32    allocationStrategy;
  119.   string    id;
  120.   uint32    size;
  121.   
  122.  RENDERINDEXSOURCE
  123.   * INDEXSOURCEDATA
  124.  
  125. RENDERSTREAM
  126. ------------
  127.  
  128.  Description:
  129.   RENDERSTREAM nodes determine which vertex buffers are to be used. For example:
  130.  
  131.   RENDERINDEXSOURCE
  132.    * INDEXSOURCEDATA
  133.    * RENDERSTREAM (references xyz buffer)
  134.    * RENDERSTREAM (references normal xyz buffer)
  135.    * RENDERSTREAM (references uv buffer)
  136.  
  137.  Properties:
  138.   string    dataBlock;
  139.   uint32    subStream;
  140.   string    id;
  141.  
  142.  Heirarchy:
  143.   RENDERSTREAM
  144.    * no children
  145.   
  146. INDEXSOURCEDATA
  147. ---------------
  148.  
  149.  Properties:
  150.   void*    data;
  151.   
  152.  INDEXSOURCEDATA
  153.   * no children