Saving video Ram

BlitzMax Forums/BlitzMax Programming/Saving video Ram

gameshastra(Posted 2008) [#1]
Hi,
What module is used to load dds textures and display them so that video ram is saved. I have the exrloader module will that help?.
Your help is appreciated


GfK(Posted 2008) [#2]
You don't need to start 300 threads about the same thing!


Dreamora(Posted 2008) [#3]
You are doing 2D so most likely you don't use any DDS as DXT degrades the visual quality and in 2D you don't have the situations "where this does not mather" most likely.


TaskMaster(Posted 2008) [#4]
...and in 2D you don't have the situations "where this does not mather" most likely.


I disagree with this statement. I think it is quite possible for a 2D game to use much more memory than a 3D game.

The graphics in a 2D game can be high res, and if you make one character with 15 different animations, 8 frames per animation, you could end up needing 3 sprite sheets of 1024x1024. Then, make an RTS game with 12 different units and you could end up needing 36 1024x1024 graphics in memory. Then add in buldings, terrain, trees, etc...

A 2D game could end up needing LOTS of video memory. If you want to keep all of the graphics in VRAM so that the frame rate stays high.


Arowx(Posted 2008) [#5]
Got to agree with taskMaster, I've just built my first game and after it's first critical review went back and ensured it had animation and better looking graphics (rendered in povray ;o) ) using incbin to include all the graphics the game went from around 1.3 Mb to 15.6Mb.

Quite a bit of VRAM, although modern cards tend to have at least 64-256 Mb!

You can see it here:


xlsior(Posted 2008) [#6]
using incbin to include all the graphics the game went from around 1.3 Mb to 15.6Mb.


And keep in mind that those are compressed images -- they'd take a whole lot more video ram than that.


Czar Flavius(Posted 2008) [#7]
1.3 Mb to 15.6Mb.


Isn't that just the file size?


Dreamora(Posted 2008) [#8]
Nobody said that 2D Games don't have more texture data than 3D games.
The problem is that DXT fragments the picture and with a 2D game where you do not have any perspective and the like, its more likely to realize the presence of those fragments


MGE(Posted 2008) [#9]
I never worry about it. The card will move textures in/out as needed anyway. Granted my goal is to never have more than 32mb needed for any particular level, but go ahead and load all your graphics up. The card will store them on the hard drive until they're needed in VRam. ;)


Czar Flavius(Posted 2008) [#10]
Hard drive?


Dreamora(Posted 2008) [#11]
MGE: DirectX does that. OpenGL does not do it, it has no memory management. BM will push everything to card you try to render between 2 flips and if the VRAM is to small it will just bomb with a MAV, same as Blitz3D does if you flood the VRAM by the way (there it dies on renderworld)


Arowx(Posted 2008) [#12]
Used ATI Tray Tools to monitor VRAM usage and Qbix uses about 100Mb of it thankfully my card has 128Mb, but with all those on chip Gfx cards using shared memory of 32Mb or less I might have a problem!

Maybe if I blend or blur the moving cubes it will still look smooth and I can use less images?

Still need to lose 2/3 of the textures! Ouch!


MGE(Posted 2008) [#13]
ooop sorry. I should have said DirectX, due to it's texture management. I know zippo about OpenGL. what? No auto texture management? With DirectX everything is stored in system memory and pulled in as needed. I had no idea OGL didn't do this. Yikes...


MGE(Posted 2008) [#14]
"Qbix uses about 100Mb of it thankfully my card has 128Mb"

Your physical screen takes up memory as well. Double in 32bit mode compared to 16bit. ;)


tonyg(Posted 2008) [#15]
Certainly using pow2 textures and, probably, lower colour depths, might help but I wonder whether single-surface textures would help?
If possible loading data by level would reduce resource usage.


MGE(Posted 2008) [#16]
Oh yah, ofcourse only use 256x256, 512x512, 1024x1024 textures. The fewer the better!