Re: [AD] native image loaders |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: "Coordination of admins/developers of the game programming library Allegro" <alleg-developers@xxxxxxxxxx>
- Subject: Re: [AD] native image loaders
- From: Matthew Leverton <meffer@xxxxxxxxxx>
- Date: Fri, 9 Apr 2010 20:07:37 -0500
On Fri, Apr 9, 2010 at 8:01 PM, Matthew Leverton <meffer@xxxxxxxxxx> wrote:
> The purpose of getting rid of explicit functions is to make sure the
> image add-on always has the same public API, regardless of what is
> loaded into it. I also think it simply looks ugly to have all of those
> functions when they aren't really needed.
>
And I should also mention that with native loader support, the API
would get polluted:
al_load_gif(); // only supported on Windows if using GDI+
al_load_tiff(); // only supported on Windows if using GDI+
I'm sure the same goes for formats with native OS X loading.
And introducing this is also bad:
al_load_gdiplus_image(); // ties you into Windows
It wouldn't be obvious when to call load_gdiplus for, say, a GIF or
TIFF file. Or when to call al_load_jpg(), etc.
> to have conditional support. There would be no name collisions if
> somebody else then linked your program with a version of acodec that
> already contained ogg; the worst that would happen is the register PNG
> call would fail because allegro_init_acodec_addon() would have already
> registered.
>
I obviously meant the register OGG call would fail.
--
Matthew Leverton