View Single Post
scratt
Veteran Member
 
Join Date: Jul 2004
Location: M-F: Thailand Weekends : F1 2010 - Various Tracks!
Send a message via Skype™ to scratt 
2010-05-23, 22:25

Good question.

Far better for you to do the models as efficiently as you can, and then I'll work on a procedural way to generate the cubes for explosions. Then it will be possible to load balance it if frame rate does become an issue.

Anecdotally it's worth remembering that on all iDevices the CPU is awesomely powerful. So procedurally generating stuff (especially with a bit of vector math; VFP or NEON) is often blazingly fast. Much faster than you expect.

Where as moving data to the GPU, or the GPU drawing extra stuff is quite slow.

So overall we try to load up the CPU and do as much culling, or other clever stuff CPU side before we bother the GPU.

EDIT : What would be nice is if we did ever get OpenCL or Geometry Shaders on an iPhone. Then we could just makes the cubes from the meshes on the fly in shaders.. In fact you could make the models out of single vertices for the center of each cube unit and I could construct them, explode them, or turn them into an array of bananas on the fly! But I am dreaming right now.

'Remember, measure life by the moments that take your breath away, not by how many breaths you take'
Extreme Sports Cafe | ESC's blog | scratt's blog | @thescratt
  quote