Re: [AD] Windowing

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


"White, Ben" <ben.white@xxxxxxxxxx> writes:

I don't think I understand your suggestion.  Could you give more
information, perhaps, with some pseudo-code of what you would like to
be able to do.

There are some problems with using pixmaps as video bitmaps and
avoiding double buffering for screen data.

X-Windows version of Allegro makes very good environment for debugging
and, IMHO, its other strength is ability to work with any X-server.
XwinAllegro can set any color depth on any X-server because it uses
automatic conversion from Allegro pixel format to the X-server pixel
format.  Avoiding implicit double-buffering will give problems with
direct access to video bitmaps (it will not be direct at least for
screen, but video bitmaps can use shared memory extension) and in
cases when color depths of screen and window do not match, there will
be problems with getting pixels from screen (they will be different
from what you wrote there).  And it will be necessary to use
lost_bitmap callback, because window contents can be lost.

Implicit double-buffering helps to solve these problems, but it
effectively disables almost all hardware acceleration for graphics
primitives.  I don't think it is very bad, because most programs
should be able to work without hardware acceleration (Allegro does not
provide hardware acceleration for 3D anyway) and current WIP version
can use optimized asm graphics primitives on Intel based platforms.

To summarize, I will try to make X-Windows version with implicit
double buffering (with DGA extension it may need no buffering in some
cases) and will not try to use pixmaps, because I'm not sure that it
will be better and it will be more work for sure.  Anyone who wants
hardware acceleration for graphics primitives can try to do it with
different graphics driver.  It should be possible to share mouse and
keyboard drivers between different versions of X-Windows versions of
Allegro.

> Also, what is the current status of XWinAllegro -
> is it being merged with full allegro and where can I get a copy (the only
> site I am aware of is Michael's original site, where I can only see version
> 3.0).

It is partially merged with Allegro 3.9 (WIP version).  Last version
is 3.9.21 and it is linked from
http://www.talula.demon.co.uk/allegro/wip.html.
X-Windows part is not finished, only mouse and timers work.

> PS Another thing I would like to do (a big motivator for windowing events)
> is to make an addon for the allegro GUI.  Something like GTK+ or EZWGL where
> widgets size and position themselves automatically based on the hierarchy in
> which they are ordered.  This would allow people to use Allegro to make
> pretty decent window GUI programs.

I was thinking about it too.  I think the easiest would be to make
addon for changing layout of elements in a dialog.  Programmer can
specify layout for each element relative to other elements and then
call function for changing position and size of elements, passing
this layout information.  I did not think about details though.

-- 
Michael Bukin



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