Return to previous page | Return to menu | Go to next page


8-11. Priority

In Sega Saturn, it is possible to set the drawing priority called priority for all the face types to be drawn. By using priority, for example, multiple scroll planes can be drawn separately for background and text display, and a 3D polygon plane can be sandwiched between them. However, the back screen is always drawn on the back.

Figure 8-28 Priority image

Use the library functions “slPriorityNbg0 to 3” and “slPriorityRbg0” corresponding to the scroll plane type to set the priority for scrolling in SGL.

[void slPriorityNbg0-3 (Uint16 priority_num);]
[void slPriorityRbg0 (Uint16 priority_num);]
Set the priority for each scroll plane.
A value from 0 to 7 called a priority number is assigned to the parameter.
The higher the priority number, the more the scroll surface is drawn in front.
If 0 is specified, the scroll surface is treated as transparent and is not actually drawn.
Refer to the figure below for the priority when the same priority number is assigned to multiple face types.

Figure 8-29 Priority when priority numbers are equal

Note) POLYGON is included in the sprite.

In SGL, the priority is assigned to each drawing surface as follows.

Table 8-25 Priority of each drawing surface in default state

Note) Polygon surface is included in the sprite.

The following sample program (Listing 8-9) implements scroll priority processing by actually using the SGL library function “slPriorityNbg0-3, Rbg0”.

List 8-9 sample_8_11: Scroll display priority

Flow 8-13 sample_8_11: Scroll display priority


Return to previous page | Return to menu | Go to next page