Homebrew Official Colored Cube - GX2 Example

dimok

Well-Known Member
OP
Member
Joined
Jan 11, 2009
Messages
728
Trophies
3
XP
2,635
Country
United States
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/

cube.png


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

  • colored_cube.zip
    95.5 KB · Views: 693
Last edited by dimok,

oumoumad

Well-Known Member
Member
Joined
Apr 20, 2015
Messages
798
Trophies
0
Age
31
XP
890
Country
France
You've done amazing work in the scene Dimok, we would never get this far today without you ^^,
I wish you luck in your life ;)
 

Psi-hate

GBATemp's Official Psi-Hater
Member
Joined
Dec 14, 2014
Messages
1,749
Trophies
1
XP
3,418
Country
United States
I'm learning C so maybe in a few days, I'll know enough to look at this code and comprehend some of it! Thanks :)
 
D

Deleted User

Guest
huh? o.O

I thought this would be working in 5.5? I just tried the elf file out in the 5.5 elf loader, but it doesn't seem to work. :unsure:
Was the elf just designed for 5.3.2/5.4.0? Or can it work for 5.5 users too? Surely it can work since it doesn't require kernel, and GX2 functions can be used in usermode...


EDIT: Nevermind, I saw os_defs.h and found some kernel-related code. :(
 
Last edited by ,

BothyBhoy

Well-Known Member
Member
Joined
Nov 27, 2015
Messages
838
Trophies
0
Age
71
XP
339
Country
@dimok did say he wd help folk with any problems they have using his software, or for new devs who wanted to use the loadiine engine....he will pop in from time to time but has private projects and wife n family to take care of so....
 

4gionz

Well-Known Member
Member
Joined
Aug 16, 2014
Messages
793
Trophies
0
Age
33
XP
488
Country
Canada
Wow I remember seeing dimok in the wii scene when I was still just a lurker..sucks to see you go and really hope you come back eventually since this scene is seriously lacking in devs, especially devs who are willing to release and break barriers like you did.
 

Jay Clay

Well-Known Member
Member
Joined
Jul 21, 2011
Messages
107
Trophies
0
XP
157
Country
You sir are a legend and one of the few programers who contribute to the wii U scene without the need of fame or create any unnecessary hype, from the wii to the wii U scene, we salute you, and thank you for your hard work so more people can use your tools, I think more people should learn from you, thank you!.
 

TiMeBoMb4u2

Well-Known Member
Member
Joined
Oct 25, 2008
Messages
1,550
Trophies
0
Location
Hyrule
XP
1,198
Country
United States
Happy that you stayed as long as you did!
Sorry to see you go, but wish you the best!
Here's hoping that someone will start investigating that symlink/mount point that has exploit potential.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    NinStar @ NinStar: nes remix 1 had the bad one, nes remix 2 had the good one