From: Shawn Hargreaves Newsgroups: comp.os.msdos.djgpp Subject: Re: Optimization help needed Date: Wed, 11 Jun 1997 20:02:55 +0100 Organization: None Distribution: world Message-ID: References: <339B3E72 DOT 4FE AT flash DOT net> NNTP-Posting-Host: talula.demon.co.uk MIME-Version: 1.0 Lines: 22 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Chris Sequeira writes: >I got Justin Frankel's Plush 3D library to work with Allegro graphics >modes. Now I can run it at high resolutions, such as 360 x 480 Mode-X >and the like. Only one problem: the Plush framebuffer and Allegro >memory bitmaps are created with incompatible data types. The Plush >framebuffer is pure characters; the Allegro bitmap is of type BITMAP. >So, every frame, I have to call this function to copy the pixel values >to the Allegro bitmap: There's no need for anything nearly so complicated as this! You can get Allegro and Plush to share a single area of memory, by allocating your framebuffer as an Allegro BITMAP object and then just passing bmp->line[0] as the output address for the Plush rendering code. It's a while since I looked at Plush, but when I downloaded some example programs a few months ago, some of them (eg. duckdemo and flurry) used exactly this technique... -- Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/ Beauty is a French phonetic corruption of a short cloth neck ornament.