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

From GTAMods Wiki
Jump to navigation Jump to search
m
Line 1: Line 1:
 
{{RW Section|Right To Render|0x001F}}
 
{{RW Section|Right To Render|0x001F}}
  
'''Right To Render''' is a extension to a [[Atomic (RW Section)|Atomic section]] within the [[RenderWare binary stream file]] format. It is used to enable additional capabilities during the rendering process.
+
'''Right To Render''' is a extension to an [[Atomic (RW Section)|Atomic]] or [[Material (RW Section)|Material]] chunk within a [[RenderWare#Binary_Streams|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==
 
==Binary structure==
  
The section is typically 8 byte in size, containing two values that represent settings for the rendering process.
+
The chunks contains two values:
  
   4b - DWORD  - RW section identifier (e.g. [[Skin PLG (RW Section)|0x0116]] or [[Material Effects PLG (RW Section)|0x0120]])
+
   uint32    - RW plugin identifier (e.g. [[Skin PLG (RW Section)|0x0116]] or [[Material Effects PLG (RW Section)|0x0120]])
   4b - BOOL   - Applies to geometry (0 if the section identifier equals 0x0120, 1 if it is 0x0116)
+
   uint32   - extra data
  
If the section identifier states that there may be a Material Effects section, there is typically another Material Effects section defined as extension for the atomic. Note that neither the Right To Render nor the Material Effects extension for the atomic are an indicator for the existence of a Material Effects section for the geometries material(s), or a Skin. However, those sections do not work, if the Right To Render is not set.
+
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 PLG (RW Section)| Skin]] and [[PDS PLG| 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==
 
==See also==
  
 
* [[Atomic (RW Section)|Atomic]]
 
* [[Atomic (RW Section)|Atomic]]
 +
* [[Material (RW Section)|Material]]
 
* [[Skin PLG (RW Section)|Skin]]
 
* [[Skin PLG (RW Section)|Skin]]
* [[Material Effects PLG (RW Section)|Material Effects PLG]]
 
 
* [[RenderWare binary stream file]]
 
* [[RenderWare binary stream file]]
  
 
{{N|SA|VC}}
 
{{N|SA|VC}}
 
[[Category:GTA_3]]
 
[[Category:GTA_3]]

Revision as of 19:11, 7 June 2016

{{{NAME}}}
RenderWare Stream Section
Vendor {{{VENDORNAME}}}
Module {{{MODULENAME}}}
Module ID 0x{{{MODULEID}}}
Identifier 0x{{{IDENTIFIER}}}
Chunk ID 0x{{{MODULEID}}}{{{IDENTIFIER}}}
Versions All
Hierarchy
Parents:
None
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