Mail Archives: djgpp/1997/06/13/07:03:51
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 -