🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #5199

Re: Need a good line drawing function for VGA

#5199
From: Doug McDonald
Date: Thu, 14 Mar 1991 02:08
29 lines
1750 bytes
In article <1991Mar14.020823.5530@cc.helsinki.fi> teittinen@cc.helsinki.fi writes:
>Hello!
>
>I'm writing a program that draws red-blue stereopictures on the screen
>and I have a problem. Now I probably should tell you that I'm writing
>this program in TC++. Anyway, because I draw two pictures of the object
>in different colors, I don't want either color to wipe the other out. So
>I use XOR-mode for drawing the lines (setwritemode(1);). But now the
>problem is that when two lines in one image overlap, the overlapping
>part is erased. And this is not too rare, for I draw wire-frame images
>of the objects.
>
>So what I need is possibility to draw lines using OR-mode. 


I posted a set of assembler routines to do EXACTLY what you wish to do
soem time ago. IT was called egafast and was posted to, I believe,
comp.sources.misc. It should still exist in the early archives of
that group. IF not, I can send it to you be e-mail.


You do what you want by noting that one bit plane controls red and another
one blue. You simply instruct the VGA (or EGA) controller to write 
to ONLY the red plane when doing red and ONLY the blue plane when doning
blue - then you can use either XOR or OR mode quite well.


Doug MCDonald 
Technical Details
Message-ID: <1991Mar14.152927.25350@ux1.cso.uiuc.edu>
Path: arc1-ca.pugleaf.net!utzoo!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!news.cs.indiana.edu!ux1.cso.uiuc.edu!usenet
References: <1991Mar14.020823.5530@cc.helsinki.fi>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!news.cs.indiana.edu!ux1.cso.uiuc.edu!usenet
From: mcdonald@aries.scs.uiuc.edu (Doug McDonald)
Newsgroups: comp.os.msdos.programmer
Subject: Re: Need a good line drawing function for VGA
Message-ID: <1991Mar14.152927.25350@ux1.cso.uiuc.edu>
Date: 14 Mar 91 02:08:23 GMT
References: <1991Mar14.020823.5530@cc.helsinki.fi>
Sender: usenet@ux1.cso.uiuc.edu (News)
Organization: University of Illinois at Urbana
Lines: 29