[AD] DGA 2.0 driver completed

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


I've finished the work on it! It's into a separated file (xdga2.c), because I
felt better having it apart from the huge xwin.c... I've also recoded the events
handler specifically for DGA 2, and though this could have been done modifying
the existing one used by both the Xwindows and DGA 1 drivers, again I preferred
to recode it, mainly for clarity purposes.

The driver supports only fullscreen modes; I found a bit too messy and hard
to read the way DGA 1 now works, expecially for me that I'm not its author. So I
left mode emulation out as George Foot suggested.

Now, the DGA 2.0 driver is compiled only if ALLEGRO_XWINDOWS_WITH_XF86DGA2 is
defined, so the configure script should be modified to support it. I don't know
how to handle it, as I have no knowledge on autoconf or such tools, so if
someone can do it, I'd be grateful.
For example testing for DGA 2.0 could be done by looking if the file
/usr/include/X11/extensions/xf86dga.h declares XDGASetMode().
DGA 1 uses the same include file, but doesn't support this function.

I've noticed that DGA 1.0 and 2.0 drivers cannot cohexist under XFree 4, as
when GFX_AUTODETECT is used, DGA 2.0 is first tested, but if it fails
(requested resolution is not supported for example), DGA 1 is detected, and
that's bad under XF4 as it would hang the system. So the configure script should
detect to compile only one among DGA 1 and DGA 2 drivers.

The driver also supports hardware acceleration if available, providing support
for hline, vline, rectfill, clear_to_color, blit, masked_blit and draw_sprite
(on video ram of course).

All the Allegro test programs and examples work for me, but bugs may be still
there, so some more testing is welcomed from anyone who has XF 4.0.x.

Things that are still to do: the Allegro docs have to be updated, as
well as the allegro.cfg file.

I'd post the diff files here now, but currently I can't do it, as I'd need the
current Allegro CVS sources to generate them, and Sourceforge is unreachable
for me at the moment. I'll try again later today...

-- 
Angelo Mottola
a.mottola@xxxxxxxxxx

PS: while testing the Allegro example programs with my new driver, I found the
only one which crashes is ex3d; anyway I've discovered this example also crashes
with the Xwindows driver, so the problem is not with my code. It always crashes
if you select 8bit color, and when the cubes drawing mode is changed to
POLYTYPE_GRGB. If you start the example with hicolor depth, all drawing modes
run fine, but the program gives a segmentation fault once you exit it. I may be
wrong, but I guess the problem is with the new polygon routines added to Allegro
recently, as this example always worked for me with old lib versions...



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