Difference between revisions of "Right To Render (RW Section)"

From GTAMods Wiki
Jump to navigation Jump to search
Line 22: Line 22:
  
 
* [[Skin PLG (RW Section)|Skin]]
 
* [[Skin PLG (RW Section)|Skin]]
 +
* [[Material Effects (RW Section)|Material Effects]]
  
 
{{N|SA|VC|3}}
 
{{N|SA|VC|3}}

Revision as of 12:13, 11 September 2020

Right To Render
RenderWare Stream Section
Vendor Criterion Games
Module Core
Module ID 0x000000
Identifier 0x1F
Chunk ID 0x0000001F
Versions All
Hierarchy
Parents:
Atomic (Extension), Material (Extension)
Children:
None
Extensions:
None
File Format

Right To Render is a extension to an Atomic or Material chunk within a RenderWare stream. It records which pipeline was attached to the Atomic or Material when it was being written so that it can be attached again when the file is read.

Binary structure

The chunks contains two values:

 uint32    - RW plugin identifier (e.g. 0x0116 or 0x0120)
 uint32    - extra data

After this has been read and if the plugin identified by the first value has registered a stream rights callback, this callback is called using extra data as an argument and usually attaches a pipeline. The extra data is typically used to select a pipeline if the plugin provides more than one; when streamed out, the attached pipeline's extra data value is written out. In GTA the Skin and PDS plugins are the only plugins which register a stream rights callback. If no pipeline is attached or it's plugin ID is 0, this chunk is not written.

See also