|
Large bitmap: al_load_bitmap() returns NULL |
niks
Member #5,265
November 2004
|
Hi everyone, Firstly, kudos to the developers for pushing out A5. A friend and I have been working with A4 for a while and now I'm in the process of transitioning our code to the new API. I'm having trouble loading a large bitmap. Details: In my code, I have enabled the image add-on like so, before loading the bitmap: It works successfully with smaller bitmaps, such as these: Now this was code that was working in A4, so I'm wondering if anyone else has had problems loading large dimension bitmaps using the image add-on on A5? Since I'm generating the tilemaps from Mappy level editor, I can force it to have almost-equal width and height during export, which will make my program work for now. However, this is not a permanent solution since it will not work for the final level design in which the resulting bitmap will be inevitably large in dimension. Any thoughts? and/or recommendations? Thanks, References |
gnolam
Member #2,030
March 2002
|
Make sure you're loading it as a memory bitmap with al_set_new_bitmap_flags(). Otherwise, it has to be uploaded to your graphics card as a texture, and there's a good chance your card/drivers won't support such a wide texture. -- |
niks
Member #5,265
November 2004
|
Thanks, gnolam. For the quick and concise reply. I did read about this in the manual here: al_set_new_display_option() but I didn't know you could set it on a per-bitmap level. Quote: ALLEGRO_MAX_BITMAP_SIZE: When queried this returns the maximum size (width as well Awesome! |
|