Re: [AD] variadic al_create_queue

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


I think we should aim to get the api calls as simple as possible for
the user who wants the standard setup*. This is not only nice for our
target market but also (more importantly) gives Allegro the best
chance to pick some settings which will give good performance on that
machine. Contrast the A4 case where the user has to think about video
bitmaps and page flipping etc., possibly getting it wrong. We've
already made huge strides in this direction IMO.

Pete
* We don't really yet know what the most common uses are, but I could
imagine a single function taking a width, height and some flags which
initialises Allegro, creates and registers the queues and creates the
initial display.

On Wed, Aug 27, 2008 at 4:00 PM, Trent Gamblin <trent@xxxxxxxxxx> wrote:
> On Wed, August 27, 2008 8:56 am, Elias Pschernig said:
>> On Wed, 2008-08-27 at 20:21 +1000, Peter Wang wrote:
>>> What you do you think about a variant of al_create_queue() which
>>> takes a
>>> list of event sources to register?
>>>
>>>     queue = al_create_queue_register(display, al_get_keyboard(),
>>>      al_get_mouse(), timer, NULL);
>>>
>>> Might reduce boilerplate a bit.
>>>
>>
>> Sounds good to me.
>>
>> I'd also like a way to reduce all the *init calls, maybe something
>> like:
>>
>> al_init(ALLEGRO_KEYBOARD |
>>       ALLEGRO_MOUSE |
>>       ALLEGRO_JOYSTICK |
>>       ALLEGRO_IIO |
>>       ALLEGRO_FONT |
>>       ALLEGRO_KCM_AUDIO)
>>
>> or maybe
>>
>> al_init("keyboard", "mouse", "joystick", "iio", "font", "kcm_audio",
>> NULL)
>>
>> The latter once would allow finding addons at runtime. There also
>> would
>> be a shortcut forum:
>>
>> al_init(ALLEGRO_ALL) or al_init("all", NULL)
>>
>> Personally, I would then always use the all variant :) But nobody
>> would
>> be forced, al_init(0/NULL) would keep working.
>>
>> For addons, I think we might want to adopt the old modules mechanism
>> (all of which are gone now I think). So al_init("iio") could
>> actually
>> try to locate <allegro-modules-path>/liba5_iio.so and try to
>> initialize
>> it, just like it worked with modules in A4 - I think that would make
>> linking much easier.
>
> Do we really gain anything other than a few keystrokes from all of
> this?
>
> Trent :{)>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> --
> https://lists.sourceforge.net/lists/listinfo/alleg-developers
>




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/