Changes

25 bytes added ,  05:07, 19 August 2015
Line 1,458: Line 1,458:  
!  Value
 
!  Value
 
!  Final stencil value
 
!  Final stencil value
 +
!  OpenGL equivalent
 
|-
 
|-
 
| 0
 
| 0
| destination
+
| old_stencil
 +
| GL_KEEP
 
|-
 
|-
 
| 1
 
| 1
| destination & ~source
+
| unknown
 +
|
 
|-
 
|-
 
| 2
 
| 2
| same as 1
+
| reference
 +
| GL_REPLACE
 
|-
 
|-
 
| 3
 
| 3
| Weird operation.
+
| max(old_stencil + 1, 255)
 +
| GL_INCR
 
|-
 
|-
 
| 4
 
| 4
| Weird operation. TODO: find out what it is exactly.
+
| min(old_stencil - 1, 0)
 +
| GL_DECR
 
|-
 
|-
 
| 5
 
| 5
| destination ^ source
+
| ~old_stencil
 +
| GL_INVERT
 
|-
 
|-
 
| 6
 
| 6
| Another weird operation.
+
| unknown
 +
|
 
|-
 
|-
 
| 7
 
| 7
| same as 4
+
| unknown
 +
|
 
|}
 
|}
'destination' is the value present in the stencil buffer, 'source' is the replacement value specified in command 0x0105.
+
 
 +
'old_stencil' is the value present in the stencil buffer, 'reference' is the reference value specified in command 0x0105.
    
=== Parameter structure for command 0x004D ===
 
=== Parameter structure for command 0x004D ===
68

edits