bitmap Size

Started by
4 comments, last by jollyjeffers 18 years, 4 months ago
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
-=Blue Skiddo, We Can Too!!=-
Advertisement
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.

Raymond Jacobs, Owner - Ethereal Darkness Interactive
www.EDIGames.com - EDIGamesCompany - @EDIGames

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.
-=Blue Skiddo, We Can Too!!=-
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?

Raymond Jacobs, Owner - Ethereal Darkness Interactive
www.EDIGames.com - EDIGamesCompany - @EDIGames

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

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

[lol] Did a google search and somehow turned up a copy of one of my articles from five years ago as the answer... Funny that.

Check the DDCAPS2_WIDESURFACES enumeration with the DDCAPS::ddsCaps::lCaps2 value.

hth
Jack

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

This topic is closed to new replies.

Advertisement