Re: [AD] New graphics API, take 2

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


On 2002-01-04, Bob <ohannessian@xxxxxxxxxx> wrote:
> Shawn Hargreaves wrote:
> > Why is AL_DISPLAY different to AL_BITMAP? 
> 
> The rationale was that Allegro would keep a table of bitmaps somewhere to 
> represent, for example, all three buffers of a triple buffer display. 
> al_acquire_display() would simply return the next bitmap to draw on. If we 
> have one bitmap, then we may need to do through hoops to fill in the vtable 
> with the proper values for it to reference the correct memory location.

This is getting slightly ahead, but if we are going to support
multiple windows/monitors, we need some way to differentiate input
from different sources.  I was thinking this:

	AL_DISPLAY *dpy = al_create_display(...);
	al_install_keyboard(dpy);
	al_read_key(dpy);  /* or whatever */

An AL_DISPLAY structure can contain whatever fields required.  With a
bitmap you would have to go through a "private" field, and check the
bitmap type in all the input functions.  And it'd be weird.

PS. A big sorry to George for pissing over his idea to passing around
an input structure, which I just stole :-P



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