liballeg / allegro5

The official Allegro 5 git repository. Pull requests welcome!
https://liballeg.org
Other
1.88k stars 283 forks source link

Mipmap support #559

Open SiegeLord opened 8 years ago

SiegeLord commented 8 years ago

See https://www.allegro.cc/forums/thread/614948 for a motivating story. In short, perhaps we should add al_update_mipmaps or update mipmaps manually after every dirtying operation?

fatcerberus commented 8 years ago

He's not the first one to come across that bug either... I remember a few other posts in the past about images gradually fading into darkness.

fatcerberus commented 8 years ago

Anyway I think al_update_mipmaps Is a good idea, along with perhaps making mipmaps not used by default, i.e. The user has to request them explicitly.

The reason I say disable by default is that, as mentioned in that thread, the mipmapping behavior only affects D3D if the image is POT--for GL it affects all bitmaps. So a Windows developer may never encounter it and thus never call the proposed function--then wonder why it doesn't work properly when run on a different platform.

I'm completely against Allegro automatically updating the mipmaps automatically, as that could be a massive performance issue depending on the how the game does its rendering.