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

From GTAMods Wiki
Jump to navigation Jump to search
m
m
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{RW Section|Right To Render|0x001F}}
+
{{RW Section
 +
| NAME = Right To Render
 +
| VENDORNAME = Criterion Games
 +
| MODULENAME = Core
 +
| MODULEID = 000000
 +
| IDENTIFIER = 1F
 +
| PARENTS = [[Atomic (RW Section)|Atomic]] ''([[Extension (RW Section)|Extension]])'', [[Material (RW Section)|Material]] ''([[Extension (RW Section)|Extension]])''
 +
}}
  
'''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]]
 
 
* [[Skin PLG (RW Section)|Skin]]
 
* [[Skin PLG (RW Section)|Skin]]
 
* [[Material Effects PLG (RW Section)|Material Effects PLG]]
 
* [[Material Effects PLG (RW Section)|Material Effects PLG]]
* [[RenderWare binary stream file]]
 
  
{{N|SA|VC}}
+
{{N|SA|VC|3}}
[[Category:GTA_3]]
 

Latest revision as of 12:14, 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