|Problems loading big Bitmaps|
I feel strange asking a question on my own message board =0
I have a rather large bitmap (1500x1500). If I try to load it into a surface the whole program crashes. Why?
I can think of two answers:
1. You are loading it to video RAM and there's not enough free memory, try with system ram instead.
2. Your gfx card doesn't
support surfaces bigger than the screen resolution, I don't know how usual
this problem is but I know it exists.
It's a good idea to fetch
the error code from the directdraw functions, otherwise you don't really
know what the problem is.
Peter, I ran into the same problem when I released my game for alpha testing. Some of the testers (even though they had fairly good video cards) could not load bitmaps greater than a certain size (in most cases 1MB). Other testers with worse systems could handle it just fine.
Now, for some of those that did have a problem, downloading the newest version of their display driver solved the problem. For others, there was nothing I could do to fix it. So, I had to reduce the size of my planet bitmaps to 750k or less. Nobody's computer had a problem with that.
There is a solution to this problem, but I'm not sure if it'd work for you, or if you've already thought of it. You can just load fragments of the bitmap onto a GROUP of surfaces and display them as though they were one. I tried this and it worked in all cases... but I decided to just stick with smaller planets anyway since they were slowing down the users with low VRAM capacity in some instances.
Hope this helps,
That's the tricky part about
directx, you have to check the capabilities if there's a change the function
is not supported by the device.
Daniel Netz, Sentinel Design