obj versus .h models

Member
Posts: 86
Joined: 2008.04
Post: #1
Cheetah 3d has the ability to export models as .h files.
This removes the need to load an obj.
On the downside, I think it does increase the memory footprint of my app... the memory used is probably the same if I manually loaded the obj.

I just can't unload a model in a low memory situation.
All models loaded this way are always "resident".

But my question is are there any other downsides to this approach?
Quote this message in a reply
Member
Posts: 166
Joined: 2009.04
Post: #2
Like you said, not a good idea ... its not just unloading in a low mem situation .....if you are using VBOs, you will essentially have two copies of your model in memory.
Quote this message in a reply
Moderator
Posts: 3,571
Joined: 2003.06
Post: #3
So just load the .h as a text file then. It's not that hard to modify and parse as you see fit -- it's certainly a more friendly format than writing your own .obj loader. I have a quick and dirty Cheetah-friendly .obj loader if you want to mess with it: http://www.anotherjake.com/AnotherJake/S...oader.html

In terms of low memory situations, I ignore them at runtime, but not during development. If the system can't make space for my game then the game (or game level) is too big.
Quote this message in a reply
Member
Posts: 86
Joined: 2008.04
Post: #4
Thanks for the feedback - Im going to take a look at switching back to loading the model from .obj...going to use your app as a starting point Jake - thanks again

BTW - Is there an easy way to see the "memory breakdown" of my app resident in memory?
e.g...
textures
models
sounds
etc...

Even if it just listed the big allocations and their variable names would be helpful...

I know it probably doesn't exist, but it would be sweet

I think I saw there is a new OpenGL view for instruments in XCode 4...has anyone tried it?
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  C versus Objective C Nosredna 4 3,289 Mar 13, 2009 08:55 AM
Last Post: miq01
  iPhone versus iPhone 3G versus iPod Touch Jake 8 4,497 Aug 27, 2008 02:49 PM
Last Post: maximile