Tuesday, December 23, 2008

Adding Wii as a platform

I've had the Wii Homebrew Channel installed for a while (I think I had previously loaded beta 8), but I never got around to setting up DevKitPro and playing with the libraries. Following some of the examples, I figured out how to set up video, load files from SD card, and load PNG images to one of the GX texture formats. After some work I got my Texture and Model classes to compile with libogc GX calls in place of the usual OpenGL ones.

At the moment I have way too many files that include the GL and SDL headers directly. I was planning to write a material/shader system that would keep all of that stuff behind abstraction layers, and supporting the Wii makes this a new priority. I may end up able to run the same core engine code on Windows, Linux, OS X, GameCube, and Wii. No idea yet on performance, but we'll see once I get ODE through the cross-compiler.

This is the crate model (models/crate.model and textures/crate.png) loaded from an SD card and displayed on my Wii. The bottom-right stuff is my Linux desktop on picture-in-picture.

No comments:

Post a Comment