Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Win32 Resources - Limited Numbers?

This topic is 5285 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello all, My question regards Microsoft Windows resources. Currently I am involved in a project that requires storage of many small, square bitmaps. The sizes range from 16x16 to possibly 64x64 in pixels, and somewhere on the order of about 200 at maximum. I''ve written a wrapper class to contain, parse, and draw one of these small bitmaps, and it works well. But here''s my problem. I''m using HDC''s and HBITMAP''s and such as members of this class (that is instantiated as many times as there are images). But I''m concerned that windows only allows a certain number of DC''s to be used at a given time. My concerns stem from the fact that I know (or at least I *think* I do) that Windows limits the number of timer resources in use by the system, so naturally it would seem that Windows may also enforce this kind of policy for graphics resources, but I''ve never heard of it before. So my question is: * Is there a limit to the number of graphic resources available? * If there is, is it an exact number? (i.e. 100 dc''s, 128MB, etc) * Is it considered bad practice to have a lot of these graphics resources being used at once? My class can easily be used without the mentioned graphics objects as members, but for more efficient drawing (and as an organizational issue) I have kept them as members. Should I consider NOT doing this? Thanks.
:: MajorShredd ::
The glass is neither half full nor half empty;
rather, it is a combination of both, and the system is perfect.

Share this post

Link to post
Share on other sites
There is a limited number of graphics resources available but this is more of a problem on Windows 95/98/Me where, I believe, the exact maximum number of any given graphics object is 65556. On Windows NT/2000/XP I believe system memory is the only limiting factor.

If you are concerned with the amount of resources you are using make sure you only have allocated the handles for these resources when or shortly before you are going to be using them.

Thanks Salsa!Colin Jeanne | Invader''s Realm
"I forgot I had the Scroll Lock key until a few weeks ago when some asshole program used it. It even used it right" - Conner McCloud

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!