10-21-2012 06:45 AM
I'm currently writing a game for the playbook and having trouble with my 3D model (wavefront OBJ) file loading and parsing.
I starting using the OBJ wavefront format because it was nice and easy to sort and parse since it is ASCII based (which is obviously a major factor in it's performance/speed).
It currently takes about 1 to 2 seconds to load 50 Frames worth of OBJ files and then sort the vertices, normals and tex coords in to separate arrays in the correct order so OpenGL can build faces from them, and also load the texture for the object.
I was thinking maybe use two threads to load different parts of each map.
I dont plan on using too many models in my project and trying to keep assets to a minimum.
How else could I speed up loading performance? (apart from switching from ASCII to a binary based Model file because I have no idea how I'd write a blender exporter plug-in).
I ported the project over in to Visual Studio so I could test the performance on my (crappy) laptop for comparison (which has a similar performance to the playbook). It took almost exactly the same amount of time and noticed that my CPU usage was constantly 100% on only one core so clearly it would make sense to utilise another core and try and cut the load times.
10-21-2012 07:04 AM
wow, ok just found the solution!
Tried running in release mode instead of debugging mode an the load is virtually instant!
So even though when i'm debugging on the playbook I presume release will be ok.
Would it still be wise to run through two thread or stay simple and just use one?