OpenGX: OpenGL-like implementation for GC/Wii

Published: August 2012

OpenGX was born during the port of Toy Wars from PC/PSP to Wii/GC platform. During the porting and due to the lack of OpenGL support on GC/Wii I was forced to decide whether to change all OpenGL specific code from Toy Wars (and isolate the platform-specific rendering code) or to implement the GL calls which I needed. The decision wasn't easy. Many render engines are based on a principle of platform independence: the engine makes use of generic render routines which fallback on platform-specific code. This principle is great specially for games which need high-end graphics and lots of shader stuff, but for simple games like TW OpenGL can be thought as a platform independent layer (as can be found on almost any platform).

So I decided to walk the long way because having an OpenGL wrapper could benefit a lot of future projects which use GL (Linux games?). The official GPU documentation can be easily found on the internet, but just in case and as a future reference find it here too: GX docs. The wrapper has supports for:

  • OpenGL state (inclluding matrix stack)
  • Immediate mode drawing calls
  • Texture and mipmapping support
  • Lighting support (limted to ambiend and diffuse)
  • Texture compression support (DXT)

Woah, forgot the link, here it is:

Little help

Last month I decided tot write a little documentation, something like "why I did what I did" so it's easier to understand the code and I'll remember it in the future (if I ever want to play with the GC again).

Check out OpenGX.pdf