Changes

Jump to navigation Jump to search
2,202 bytes added ,  08:15, 5 December 2015
m
no edit summary
Line 20: Line 20:     
When drawing using triangle strips or fans, [[GPU/Internal Registers#GPUREG_RESTART_PRIMITIVE|GPUREG_RESTART_PRIMITIVE]] should be used to end the previous strip before (or while) drawing.
 
When drawing using triangle strips or fans, [[GPU/Internal Registers#GPUREG_RESTART_PRIMITIVE|GPUREG_RESTART_PRIMITIVE]] should be used to end the previous strip before (or while) drawing.
 +
 +
== Drawing elements ==
 +
 +
The 3DS GPU is capable of drawing vertex + index arrays, triggered by [[GPU/Internal_Registers#GPUREG_DRAWELEMENTS|GPUREG_DRAWELEMENTS]]. A set of commands commonly used by the standard GL implementation to accomplish this is as follows:
 +
 +
{| class="wikitable" border="1"
 +
!  Command Index
 +
!  Register
 +
!  Description
 +
|-
 +
| 0
 +
| [[GPU/Internal_Registers#GPUREG_GEOSTAGE_CONFIG|GPUREG_GEOSTAGE_CONFIG]]
 +
| Set whether drawing triangle elements
 +
|-
 +
| 1-2
 +
| [[GPU/Internal_Registers#GPUREG_GEOSTAGE_CONFIG2|GPUREG_GEOSTAGE_CONFIG2]]
 +
| Set whether drawing triangle elements
 +
|-
 +
| 3
 +
| [[GPU/Internal_Registers#GPUREG_PRIMITIVE_CONFIG|GPUREG_PRIMITIVE_CONFIG]]
 +
| Set primitive mode
 +
|-
 +
| 4
 +
| [[GPU/Internal_Registers#GPUREG_PRIMITIVE_CONFIG|GPUREG_PRIMITIVE_CONFIG]]
 +
| Set number of output map registers
 +
|-
 +
| 5
 +
| [[GPU/Internal_Registers#GPUREG_RESTART_PRIMITIVE|GPUREG_RESTART_PRIMITIVE]]
 +
| Trigger reset
 +
|-
 +
| 6
 +
| [[GPU/Internal_Registers#GPUREG_GEOSTAGE_CONFIG2|GPUREG_GEOSTAGE_CONFIG2]]
 +
| Set function indicator to 0
 +
|-
 +
| 7
 +
| [[GPU/Internal_Registers#GPUREG_INDEXBUFFER_CONFIG|GPUREG_INDEXBUFFER_CONFIG]]
 +
| Set offset and type
 +
|-
 +
| 8
 +
| [[GPU/Internal_Registers#GPUREG_NUMVERTICES|GPUREG_NUMVERTICES]]
 +
| Set vertex count
 +
|-
 +
| 9
 +
| [[GPU/Internal_Registers#GPUREG_START_DRAW_FUNC0|GPUREG_START_DRAW_FUNC0]]
 +
| Set mode to drawing
 +
|-
 +
| 10
 +
| [[GPU/Internal_Registers#GPUREG_DRAWELEMENTS|GPUREG_DRAWELEMENTS]]
 +
| Trigger draw
 +
|-
 +
| 11
 +
| [[GPU/Internal_Registers#GPUREG_START_DRAW_FUNC0|GPUREG_START_DRAW_FUNC0]]
 +
| Set mode to configuration
 +
|-
 +
| 12
 +
| [[GPU/Internal_Registers#GPUREG_VTX_FUNC|GPUREG_VTX_FUNC]]
 +
| Trigger post-vertex cache clear
 +
|-
 +
| 13
 +
| [[GPU/Internal_Registers#GPUREG_FRAMEBUFFER_FLUSH|GPUREG_FRAMEBUFFER_FLUSH]]
 +
| Flush framebuffer
 +
|-
 +
| 14
 +
| [[GPU/Internal_Registers#GPUREG_GEOSTAGE_CONFIG|GPUREG_GEOSTAGE_CONFIG]]
 +
| Clear drawing triangle elements
 +
|-
 +
| 15
 +
| [[GPU/Internal_Registers#GPUREG_GEOSTAGE_CONFIG2|GPUREG_GEOSTAGE_CONFIG2]]
 +
| Clear drawing triangle elements
 +
|-
 +
| 16
 +
| [[GPU/Internal_Registers#GPUREG_PRIMITIVE_CONFIG|GPUREG_PRIMITIVE_CONFIG]]
 +
| Clear primitive mode
 +
|-
 +
| 17
 +
| [[GPU/Internal_Registers#GPUREG_VSH_ENTRYPOINT|GPUREG_VSH_ENTRYPOINT]]
 +
| Clear entry point
 +
|}
    
[[Category:GPU]]
 
[[Category:GPU]]
1,434

edits

Navigation menu