www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1993/07/26/13:57:25

Date: Mon, 26 Jul 93 13:08:40 -0400
From: DJ Delorie <dj AT ctron DOT com>
To: garym AT argos DOT rose DOT utoronto DOT ca
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: Graphics on video

> Part of my programming task will be very well served by the XFER.S
> code so graciously posted :-), but I have a further constraint I
> expect is solvable and thought I'd ask in case anyone had some really
> elegant solutions: I want to draw on a stereo video signal where the
> cameras are switched on the input vertical retrace.  This means,
> first, I need to detect the retrace so I can change the context of my
> drawing (whether left or right views), and then I need to draw through
> a stencil of alternating clear and opaque lines.  Since I'm drawing to
> horizontal line, I expect I can modify the XFER.S to skip the opaque
> lines of my 'stencil' (unless there is some faster method --- I only
> have a few ms to render before the next video frame arrives.

For starters, you can't depend on the vertical retrace interrupt.
Some cards (especially IBM ISA VGA cards) do not provide it.  You'll
have to poll the I/O port and watch for the signal.

To handle stereo drawing, assuming full-screen stuff, the easiest way
to handle it is to create a full-screen region, double the number of
bytes per row, and halve the number of rows.  Then, for the "even"
lines draw on the left half of the region and for the "odd" lines draw
on the right half.  You might want to check to see if the new GRX
supports changing the display page on the fly - that's even faster and
you can treat the two screens as completely independent.


- Raw text -


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