Hello everyone,
as announced and wanted by several people here is a small colored cube example written in plain C which shall demonstrate the use of the WiiU GX2 engine. Basically it shows a colored cube made out of triangle primitives that is rotating. Out of convinience I used GLM library as the math library for matrix/vector calculations. It's a C++ library which is why I wrote a few wrapper functions around the calls to GLM so people can easily switch to an equivalent C math library if they want.
For this GX2 example I used the following OpenGL tutorial's example as a base:
http://www.opengl-tutorial.org/beginners-tutorials/tutorial-4-a-colored-cube/
I tried to keep almost all parts as close as possible to the original example and as simple as possible. With this you have a compare of how GX2 works to OpenGL and a documentation of the example on what is going on in it. The only changes/additions I did to this example are the following:
- added automatic cube rotation (initially)
- added gamepad D-PAD controls to rotate the cube manually
- changed aspect ratio to 16:9 instead of 4:3
That's all. Everything else is basically the same. Even the GLSL shader code is the same as in the original example. This is probably also the minimal setup you will need to use GX2. Please don't take this as the cleanest example or the "best practice" example. It's not. It should just show the basic mechanics.
This application is written for HBL v1.1.
You can find the original source code for OpenGL at this link:
http://www.opengl-tutorial.org/download/ (normal version)
Well as already mentioned on the ddd thread this is my last contribution to the WiiU (at least for a while). I am not sure when I will have time again to actually start new projects but I dont think it will happen anywhere before the end of the summer if at all. So thanks again to everyone who supported me and my applications! I hope with this last addition there will be more homebrews or games using the GX2 engine coming up in the near future.
as announced and wanted by several people here is a small colored cube example written in plain C which shall demonstrate the use of the WiiU GX2 engine. Basically it shows a colored cube made out of triangle primitives that is rotating. Out of convinience I used GLM library as the math library for matrix/vector calculations. It's a C++ library which is why I wrote a few wrapper functions around the calls to GLM so people can easily switch to an equivalent C math library if they want.
For this GX2 example I used the following OpenGL tutorial's example as a base:
http://www.opengl-tutorial.org/beginners-tutorials/tutorial-4-a-colored-cube/
I tried to keep almost all parts as close as possible to the original example and as simple as possible. With this you have a compare of how GX2 works to OpenGL and a documentation of the example on what is going on in it. The only changes/additions I did to this example are the following:
- added automatic cube rotation (initially)
- added gamepad D-PAD controls to rotate the cube manually
- changed aspect ratio to 16:9 instead of 4:3
That's all. Everything else is basically the same. Even the GLSL shader code is the same as in the original example. This is probably also the minimal setup you will need to use GX2. Please don't take this as the cleanest example or the "best practice" example. It's not. It should just show the basic mechanics.
This application is written for HBL v1.1.
You can find the original source code for OpenGL at this link:
http://www.opengl-tutorial.org/download/ (normal version)
Well as already mentioned on the ddd thread this is my last contribution to the WiiU (at least for a while). I am not sure when I will have time again to actually start new projects but I dont think it will happen anywhere before the end of the summer if at all. So thanks again to everyone who supported me and my applications! I hope with this last addition there will be more homebrews or games using the GX2 engine coming up in the near future.
Attachments
Last edited by dimok,