In memory of Ben “bushing” Byer, who passed away on Monday, February 8th, 2016.

Changes

Jump to navigation Jump to search
152 bytes added ,  18:23, 28 July 2009
m
Line 133: Line 133:  
== GX Tips ==
 
== GX Tips ==
 
=== When your code hangs drawing ===
 
=== When your code hangs drawing ===
If you find your code hanging as soon as you begin drawing with GX_Begin(), here are a couple of possible causes:
+
If your GX application hangs as soon as you begin drawing with GX_Begin(), here are a few possible causes:
# incorrect vertex formats - e.g. if you specify your position format as 3 f32 values and then when you draw, you mistakenly send only 2 f32 values, the Wii will likely hang.
+
* incorrect vertex formats - the vertex format specified with GX_SetVtxAttrFmt() must match what your app sends between GX_Begin() and GX_End()
# incorrect vertex count - e.g. if you specify you're sending 4 vertices and only send 3, the Wii will likely hang.
+
* incorrect vertex count - the vertex count specified by GX_Begin() must match the vertex count your app sends between GX_Begin() and GX_End()
 +
*incorrect vertex data order - vertex data is order dependent - the order GX expects vertex data is: position, normal, color, bi-normals, and texture coordinates
 
[[Category:Development]]
 
[[Category:Development]]
 +
 
=== Examples ===
 
=== Examples ===
 
If you are looking for GX examples. Devkitpro comes with a few GX examples which should help you to get started. Some knowledge about OpenGL is useful, but remember that GX is not the same as OpenGL.
 
If you are looking for GX examples. Devkitpro comes with a few GX examples which should help you to get started. Some knowledge about OpenGL is useful, but remember that GX is not the same as OpenGL.
54

edits

Navigation menu