Problems loading big Bitmaps
 
 
Peter

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? 

Thanks, 
Peter


 
Daniel Netz  

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. 
Create several surfaces or load surfaces only when they're needed. 

It's a good idea to fetch the error code from the directdraw functions, otherwise you don't really know what the problem is. 
But the code is returned in a long variable so I've created a function to get any possible error (almost all directx components) and return a string, like: DIERR_NOTINITIALIZED (long) returns "DIERR_NOTINITIALIZED". 
I can send it to you if you like.
Daniel Netz, Sentinel Design



 
Lucky

Greetings, 

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, 

Lucky 
theluckyleper@home.com



 
Daniel Netz  

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. 
My gfx card (Viper V330 4MB AGP) doesn't support blitting rotated surfaces and that's a real bummer.

Daniel Netz, Sentinel Design