More memory usage issues

BlitzMax Forums/BlitzMax Programming/More memory usage issues

Scott Shaver(Posted 2006) [#1]
Okay I've looked through a number of posts here about the amount of memory a bmax program takes. Running in OGL my program uses 45 meg and in DX it uses 35 meg. What's the difference?

... had an idea ...

okay I just tried this

Strict 

Framework BRL.GlMax2D
'Framework BRL.d3d7Max2D

Graphics 320,240

While Not KeyHit(KEY_ESCAPE)
	Cls
	Flip
Wend
End


DX uses 4 meg OGL 10. Clearly there is quite a bit of extra code fro the OGL driver. But why does the app take that much memory anyway, it isn't DOING anything.

...another thought....

tried LoadImageFont it is taking about a meg for each call. So I need to be careful about that. Also noticed that the images are getting loaded into main memory and kept there, that's probably my big issue. I though they would go to video ram and only be there, hmmm.


tonyg(Posted 2006) [#2]
Doesn't the 10Mb also include BRL.Max2D and BRL.GLGraphics
imported by BRL.GlMax2D and then whatever they import?
The difference in DX vs GL might be code size or the import chain.
Images only got to Video Ram once you drawimage. The first draw also does the conversion from texture to surface so is a bit slower than subsequent draws for the same image.
I might be wrong though.