Sign in to follow this  

bitmap Size

This topic is 4391 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, I am making a 2d game using direct draw. If I load any bitmap under 1920 pixels in length, it works fine. But If I try to load a bitmap any larger, everything (everything being the bitmap that was too large) is jumbled and mized together. Are there size restrictions? Anything I can do to fix this? Thank you

Share this post


Link to post
Share on other sites
are you making this image in Video Ram? if so you are likely limited by your constraints of your VRAM.

You might try to use the DirectDraw GetDevCaps and see if there is a Max Size or somthing similar on it.

I personally have done surface sizes around 1400x1400 in DirectDraw,

I would imagine a surface created in System Ram would be limited only by availiable ram (and constraints of int size for dimensions).

this is of course barring any other issues and bugs you might have, such as a bug in the bitmap loader.

Share this post


Link to post
Share on other sites
I do not think VRAM is causing the problem, because the problem is consistent no matter what computer I am using, all with different video capabilities. I am loading the bitmap to an offscreen surface. Writing the surface to the back buffer, and then presenting it.

Share this post


Link to post
Share on other sites
what do you mean by 'writing' the surface to the backbuffer?

if you are doing a manual lock unlock write are you following all of the considerations of surface pitch and proper pixel formats?

Share this post


Link to post
Share on other sites
What resolution is your display? 1920*something by any chance?

There was a restriction with some DirectDraw hardware (known as "wide surfaces") that limited the maximum width of a surface to be less than or equal to the width of the display.

I don't have my DD7 documentation to hand, but try and look up a _WIDESURFACE cap and try and check it [smile]

hth
Jack

Share this post


Link to post
Share on other sites

This topic is 4391 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this