The sixth Corona sample I’m sharing shows off rendering a 3D object, using different types of 3D rendering.
The theory behind 3D has been around for a long long time. I again turned to code I wrote back around 1996 in Turbo Pascal to put together this sample. The great thing is the theory can be applied with any language, the only challenge is rendering it. This demo shows the old method, before hardware acceleration took care of everything.
The rendering uses rectangles to fill in the poly sides. A better method should found to make this much more suitable to use in games / apps with Corona.
You can switch between rendering modes using the buttons provided on the left. Included are:
– Glenz (Transparent polys)
– Flat Shadding (Light)
– Flat Colour
Hidden surface removal us performed (except on the glenz rendering mode) to help with speed. The sample is relatively free of optimisation to help with understanding.
You can download the source here: [Download]