Availability of different geometry primitives depends on the version of the RSP microcode which has been loaded for execution.
Parameter | Values |
---|---|
v0 | vertex buffer index of the first coordinate. (0-15) |
v1 | vertex buffer index of the second coordinate. (0-15) |
v2 | vertex buffer index of the third coordinate. (0-15) |
flag | used for flat shading; ordinal id of the vertex parameter to use for shading: 0, 1, or 2 |
Other bits of the flag field are currently reserved.
Parameter | Values |
---|---|
v0 | vertex buffer index of the first coordinate. (0-15) |
v1 | vertex buffer index of the second coordinate. (0-15) |
flag | unused (should be 0) |
Lines are only available when running the line microcode. All the normal vertex attributes (color, texture, z) are also available for lines. Lines however require separate RDP render modes to be set than for polygons. Consult the man pages for more details. Z-buffered lines will only do reads of the Z-buffer, and not writes. Thus Z-buffered lines should be drawn after Z-buffered polygons.
All rectangles are 2D primitives, specified in screen-coordinates. They are not clipped, but they are scissored in a limited fashion. In 1CYCLE and 2CYCLE mode, rectangles are scissored in the same way as triangles. In COPY and FILL modes, rectangles are scissored to four pixel boundaries; meaning that additional scissoring may be necessary in the application program.
Filled rectangles are implemented entirely in the RDP, as "pass-through" commands with respect to the RSP. They are mentioned here for completeness:
Parameter | Values |
---|---|
ulx | screen coordinate of upper-left x (10.2 format) |
uly | screen coordinate of upper-left y (10.2 format) |
lrx | screen coordinate of lower-right x (10.2 format) |
lry | screen coordinate of lower-right y (10.2 format) |
Textured rectangles require minimal RSP intervention, and are thus an SP operation:
Parameter | Values |
---|---|
ulx | screen coordinate of upper-left x (10.2 format) |
uly | screen coordinate of upper-left y (10.2 format) |
lrx | screen coordinate of lower-right x (10.2 format) |
lry | screen coordinate of lower-right y (10.2 format) |
tile | which tile in TMEM to use |
s | s coordinate of upper-left corner (S10.5 format) |
t | t coordinate of upper-left corner (S10.5 format) |
dsdx | change in s per change in x coordinate (S5.10 format) |
dtdy | change in t per change in y coordinate (S5.10 format) |
There is a related macro, gsSPTextureRectangleFlip(), that is identical to gsSPTextureRectangle(), except that the texture is flipped so that the s coordinate changes in the y direction, and the t coordinate changes in the x direction:
Parameter | Values |
---|---|
ulx | screen coordinate of upper-left x (10.2 format) |
uly | screen coordinate of upper-left y (10.2 format) |
lrx | screen coordinate of lower-right x (10.2 format) |
lry | screen coordinate of lower-right y (10.2 format) |
tile | which tile in TMEM to use |
s | s coordinate of upper-left corner (S10.5 format) |
t | t coordinate of upper-left corner (S10.5 format) |
dtdx | change in t per change in x coordinate (S5.10 format) |
dsdy | change in s per change in y coordinate (S5.10 format) |