video memory question

Started by
4 comments, last by DigitalDragon505 21 years, 1 month ago
i am using DirectX7 for my 2D game. and the problem is in the fact that i have about 50 MB''s in textures. now i wonder if i load it all,what will happen? for example if i have a card with 32MB''s. will the rest of the textures be lost or stored in system memory and accesed via AGP? or something else?
Advertisement
They will be stored in slow system memory
Disclaimer: "I am in no way qualified to present advice on any topic concerning anything and can not be held responsible for any damages that my advice may incurr (due to neither my negligence nor yours)"
Haven''t worked with DirectX but it''s possible to specify where you want your textures to be stored,... right...?? If so, it''s probably wise to store frequently used in video memory and others in system memory,....

just my 2 eurocents....
--------<a href="http://www.icarusindie.com/rpc>Reverse Pop Culture
the problem is that 49 MB''s of that data are used frequently.

though i am curious,how will speed be affected if textures are stored in system memory. i only need 64x64 rect of those textures at a time multiplied by the number of units of that type on screen?
1) Under DirectDraw, if you run out of video memory then your CreateSurface() style calls will fail (assuming you''ve explicitly specified local video memory).

2) You can also specify non-local video memory which is AGP memory. The graphics chip can still access this directly and very quickly* so it''s usually fine to use for most things.

3) If you''re using Direct3D, then use "managed" resources (even under DX7) - it does a really good job for a little bit of overcommit.

4) There''s no escaping coming up with a strategy for this stuff - for a DirectX 7 2D game, many people are going to expect to be able to use it on 2Mb PCI only graphics chips. You''ll have to do some amount of system->video memory transfers. Whether you scale back the content or upload before each Blt(), you''ll have to do _something_ when the machine you''re running on is below expected spec **.

[*]<br><br>[** even some 3D games are expected to work <i>to some extent </i> &#111;n ancient 2MB hardware - when I was doing the engine for Pac-Man:Adventures in Time this was a big issue - it had to work &#111;n 2Mb chips, but there was at least 2Mb of textures required per frame - the two solutions used were managed textures and a user option to scale the sizes of all textures to fit comfortably into VRAM (the engine automatically dropped mipmaps etc but left the "scale or run slow" option to the user).] <br><br>–<br>Simon O''Connor<br>Creative Asylum Ltd<br><A HREF="http://www.creative-asylum.com">www.creative-asylum.com</A>

Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

Just curious: are these bitmaps 8 bit, 24 bit, etc? If a particular bitmap only has, say, 156 distinct colors but is 24 bit, then you''re wasting a ton of size there. You can use PaintShopPro or PhotoShop, etc, to reduce the bit depth and give it a unique palette (ie: NOT the standard Windows 256 color palette) and shrink your bitmaps down A LOT.

And if you already know this, then, I just wasted my time...

MSVC++ 6
DirectX 7
MSVC++ 6DirectX 7

This topic is closed to new replies.

Advertisement