Ok, so when creating an ALLEGRO_BITMAP with al_create_bitmap(), then drawing some content onto it and then using that bitmap, it exhibits some strange behavior in certain circumstances. Specifically, if you have set al_set_bitmap_flags(ALLEGRO_MIPMAP) and are in ALLEGRO_OPENGL. I think the odd behavior alludes to the possibility that a mipmap is just not created.
Here is an example program that illustrated the odd behavior:
Running the program should look something like this:
{"name":"609698","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/c\/3\/c3f404614a867f26efcfda574960d499.png","w":995,"h":662,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/c\/3\/c3f404614a867f26efcfda574960d499"}
But it looks like this (presumably because when scaling the bitmap, the hardware is trying to crossfade between a smaller mipmap that just isn't there, so it starts to look transparent)
{"name":"609699","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/8\/0\/809e9e8e9fb8f801ee2d324df854264b.png","w":992,"h":658,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/8\/0\/809e9e8e9fb8f801ee2d324df854264b"}
I can "fix" the issue by cloning the bitmap after drawing everything to it, (and then destroying the original for good measure), like this:
// GENERATED BITMAP in OPENGL with ALLEGRO_MIPMAP fix: ALLEGRO_BITMAP *cloned = al_clone_bitmap(generated_bitmap); al_destroy_bitmap(generated_bitmap); generated_bitmap = cloned;
Extra notes:
It may also be related to these 2 threads:
https://www.allegro.cc/forums/thread/615520
https://www.allegro.cc/forums/thread/613196
My hardware is an the Intel card, as Bruce Pascoe mentions in the 2nd thread. I haven't tried it on other hardware.