delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/10/21:33:12

From: Shawn Hargreaves <Shawn AT talula DOT demon DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Allegro LFB
Date: Wed, 10 Sep 1997 18:55:37 +0100
Organization: None
Distribution: world
Message-ID: <uo+IOIAZ8tF0EwWf@talula.demon.co.uk>
References: <s41672c4 DOT 089 AT pob DOT rwdi DOT com>
NNTP-Posting-Host: talula.demon.co.uk
MIME-Version: 1.0
Lines: 17
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Brad Fidler writes:
>I thought I had at one time saw a variable 
>or struct field somewhere that gave the address of
>the linear frame buffer (assuming it is available)
>in Allegro.

After you set up the graphics mode, the selector is in screen->seg, and
screen->line[0] is the offset to the first pixel of video memory. If you
are happy only supporting LFB hardware you can do everything with
offsets from that address, but if you want your code to work with banked
modes you must call the bmp_write_line() function to obtain the address
of each scanline before you access it.


--
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