CTR graphics are implemented by generating lists of GPU commands and using the lists to operate the GPU. (GPU commands are called 3D commands and command requests.) The graphics libraries can be broadly grouped into those that control command lists and those that generate the commands to actually render images.
Use the GX (nngx) library for low-level operations such as controlling command lists or display buffers. No matter what approach you use, you must use this library.
When it comes to generating the 3D rendering commands, however, you can choose between the GL, GD, GR, and NW4C libraries. Alternately, applications can directly generate 3D commands.
The following sections describe each command generation method. This information will help you select the best method or combination of methods for your purposes.
This is the CTR basic graphics library. This library offers a rich feature set, including the API, error handling, and state change management complying with the OpenGL ES standard. This library entails a heavier processing load than the others, with a substantial CPU load. We recommend not using this library if performance is a concern.
This library can be used essentially as a lighter-load drop-in replacement for the GL library. This library also offers an API that is easy for developers to work with.
The GD library is scheduled for inclusion in a future release.
This graphics library supports the direct generation of 3D commands. This library does not manage states internally, making it faster than the GL or GD libraries and also reducing the amount of memory required. Using it requires detailed knowledge of how to set each GPU register, however, as described in the System API Specifications. It is also more difficult to implement because users must handle error checks and other details.
The NW4C library, which serves as Nintendo's application development middleware, handles both graphics and sound. The NW4C graphics features generate internal commands rather than using other graphics libraries. This implementation means that it can be used on its own to achieve optimized performance. See the NintendoWare for CTR package and documentation for details.
You can directly generate the register write commands applied to the GPU. Generating only the required commands can boost operating speeds. This is the most difficult method to implement, however, because it requires detailed knowledge of how to set each GPU register. (Register settings are explained in the System API Specifications.) We therefore recommend using the GR library, which is implemented to support direct command generation.
CONFIDENTIAL