Re: [AD] [AL] Allegro 4.0 beta |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
George Foot <gfoot@xxxxxxxxxx> wrote: > > I've thought of a plugin-like structure before, but it feels > very messy and I'm worried that Allegro is not modular enough > for that to work properly. I don't think it's messy. Attached is my first stab at it, siphoning off the SVGAlib driver. To test it: 0. Get into Linux console (we require SVGAlib). 1. Make a throw-away copy of Allegro and patch it. You will most likely have an error while patching `makefile'. The important thing is to remove `-lvga' from the `LIBS' line. 2. Make the library and an example (e.g. `ex3d' for mode selector). 3. Get root permissions. 4. "export LD_LIBRARY_PATH=lib/unix/" and run ldd on the example program to make certain everything is spiffy. 5. Run the example, and notice SVGAlib driver is not available. 6. cd src/linux sh mksvgalib.sh mkdir -p /usr/local/lib/allegro/3.9.35 # hardcoded ATM cp svgalib.so /usr/local/lib/allegro/3.9.35 cd ../.. 7. Run the example again, the SVGAlib driver should be available. I have not benchmarked, but there shouldn't be any/much speed lost. 8. Rename `libvga.so.1' to something else, and run the example again. The SVGAlib driver will not be available. 9. Rename `libvga.so.1' back and remove test files. Obviously it is not meant to be completed code. But if it looks okay to everyone, I will finish it. I don't particularly like the `gfx_dummy' thing, so I might add an extra field to _DRIVER_INFO. Also, separating the X stuff may prove to be really hard. BTW, every Linux out there has dlopen, right? -- FLOTION (FLO shun), n. The tendency when sharing a waterbed to undulate for five minutes every time the other person moves. -- Rich Hall, "Sniglets"
Attachment:
plugin.diff.gz
Description: application/gunzip
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |