Hardware surface allocation

Hello!

I have 4mb of ram on my gfx card (Hercules Dynamite 128) and testvidinfo
reports that around 2.5 mb are free.

If I allocate all surfaces as software surfaces everything is quite slow
(Pentium 166) but if I use SDL_HWSURFACE my game runs easily on
70 fps. The “problem” is that I allocates about 5-6 MB of graphics. This
should not fit into video-memory but still it seems like things are hardware
accelerated… How is this possible? Does SDL “switch out” surfaces that
aren’t often used into ordinary memory or something? (My card does not allow
hardware accelleration from ordinary ram to video ram).

Is there a way to see how much video memory are used? (except for keeping
track of allocations by myself).

By the way, thanks for a great library. Works nicer than the library I
previously used. (Won’t say the name though… But it starts an A and ends
with llegro) =)

/ Niklas_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.

Hello!

I have 4mb of ram on my gfx card (Hercules Dynamite 128) and testvidinfo
reports that around 2.5 mb are free.

If I allocate all surfaces as software surfaces everything is quite slow
(Pentium 166) but if I use SDL_HWSURFACE my game runs easily on
70 fps. The “problem” is that I allocates about 5-6 MB of graphics. This
should not fit into video-memory but still it seems like things are hardware
accelerated… How is this possible? Does SDL “switch out” surfaces that
aren’t often used into ordinary memory or something? (My card does not allow
hardware accelleration from ordinary ram to video ram).

DirectX is taking care of surface management behind the scenes. SDL just
keeps asking for hardware surfaces.

Is there a way to see how much video memory are used? (except for keeping
track of allocations by myself).

No, not really. Even the value reported by SDL is just a rule of thumb,
it isn’t a true representation of how much memory you can use.

-Sam Lantinga, Software Engineer, Blizzard Entertainment