From: George Foot Newsgroups: comp.os.msdos.djgpp Subject: Re: Graphic Acceleration ? Date: 15 Jun 1998 14:41:47 GMT Organization: Oxford University, England Lines: 56 Message-ID: <6m3brb$qoq$2@news.ox.ac.uk> References: <01bd947a$c427b720$92c809c0 AT chessa> NNTP-Posting-Host: sable.ox.ac.uk To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk On 10 Jun 1998 14:17:07 GMT in comp.os.msdos.djgpp Alberto Chessa wrote: : Hello, : I'm examining Allegro source files to discover the secret of SVGA Graphic : Acceletators (2D)... and now it seem I find it! The secret is: no secret at : all! : The examples I have explored, always use Soft-routine on PC ram buffer, : than blit all the image to video memory. Which drivers did you look at? Allegro supports 2D hardware acceleration in the VBE/AF driver. VBE/AF is a dynamically loadable video driver system that provides access to Accelerated Functions (hence the name). You need a fairly recent Allegro WIP to have this support. VBE/AF drivers can sometimes be obtained from hardware manufacturers' web sites, but unfortunately this isn't common; most manufacturers never bothered to write the VBE/AF modules. IIRC Scitech are supplying VBE/AF modules for some cards. Shawn Hargreaves has started a project called FreeBE/AF, through which people can write (using DJGPP) VBE/AF drivers for their graphics cards, which Allegro and other programs can then use. Currently FreeBE/AF has drivers for Cirrus Logic 54x, ATI Mach64 and Matrox cards. It also has a dummy driver that works through VESA, but that's not meant to be a practical driver -- it's just for testing. You can find out more about FreeBE/AF from Shawn's web site: http://www.talula.demon.co.uk/freebe/ : The graphic board connot access : memory (only video memory), thus all the operation - draw line, box, : fill... are performed by the CPU). : In allegro.h, the device driver has only the routine to detect the board, : blit (only video memory to video memory and scroll - it cannot be used to : blit from ram to video memory). Indeed, the video card can't access main memory, and so memory-to-screen blits aren't accelerated. Commonly accelerated functions are screen-to-screen blits, line drawing and area filling. Not all cards will support all of these operations, of course. Some cards also support hardware cursor display but I'm not sure whether or not Allegro (or any other program) uses this. As a replacement for screen-to-screen blits, you can put commonly used graphics into off-screen buffers, so that those graphics can be drawn using screen-to-screen blits. The new Allegro versions have example programs demonstrating use of VBE/AF drivers. -- george DOT foot AT merton DOT oxford DOT ac DOT uk xu do tavla fo la lojban -- http://xiron.pc.helsinki.fi/lojban/lojban.html