Re: [AD] al_convert_bitmap |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
On Sun, Jun 12, 2011 at 11:16 AM, Elias Pschernig <elias.pschernig@xxxxxxxxxx> wrote: > I also left in al_convert_all_video_bitmaps for now. Can maybe remove it > now or at least rename. > I would leave it in and make a display option to disable the auto conversion behavior. That should prevent any complaints. I would use an option as opposed to a flag because a) negative flags are confusing, b) it gives the ability to offer different conversions methods in the future (although I cannot think of any other useful scenarios...), and c) it's rather obscure and probably not worth taking up a bitmask. The function could be named something like al_upload_bitmap_textures(). Anyway, I've attached a test program. (apologies for it being an abuse of copy/paste) It fails one test based on my expectations: 1) create display 2) b = create video bitmap 3) destroy display 4) b == memory (okay so far) 5) create display 6) b == memory (expect video...) I would expect it to be a video bitmap in step 6, but it's still stuck as a memory bitmap. (Alternatively, it could be automatically destroyed and unusable in step 4. But I think that's unnecessarily strict.) In other words, I would add successfully created video bitmaps to the list of bitmaps to try to convert. So to me, the check_to_be_converted_list_add(bitmap) should always be called in _al_convert_to_memory_bitmap() (assuming that latter function is only called when a display is destroyed). -- Matthew Leverton
Attachment:
test-any-bitmap.c.gz
Description: GNU Zip compressed data
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |