2.7 Combine Mode & Rendering Mode

As we explained in the previous section, you need to set the geometry mode for each color you add, but that is not sufficient. You also need to be aware of the RDP settings. However, this is a very complex topic, so here we will only explain the procedure for doing the settings, and will be covered in later parts of the tutorial, starting with Chapter 4.

One of the things you need to set in the RDP is the combine mode. You set the appropriate mode using the gDPSetCombineMode macro.

For example, to add color using primitive color (in other words, not using shading), you would instruct the RDP to conduct rendering using primitive color as follows:

List 2-6

  gDPSetCombineMode(glistp++, G_CC_PRIMITIVE, G_CC_PRIMITIVE);

On the other hand, if you want to use a shading method (vertex color or lighting), you would set the mode as follows to render based on shading:

List 2-7

  gDPSetCombineMode(glistp++, G_CC_SHADE, G_CC_SHADE);

Another essential RDP mode is the so-called rendering mode. At the present time, the same rendering mode can be used by all three coloring methods.

List 2-8

  gDPSetRenderMode(glistp++, G_RM_OPA_SURF, G_RM_OPA_SURF2);

The explanation for rendering mode is also rather lengthy, so it will be explained gradually from Chapters 5 through 7.