delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/13/07:03:51

From: Shawn Hargreaves <Shawn AT talula DOT demon DOT co DOT uk>
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: <JKNh2AAfZvnzEwdf@talula.demon.co.uk>
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

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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019