DrawTest for offscreen window bug

In October 2000, Erin Harley wrote:

>I have a question for you that I have hesitated to ask because I wanted to
>fix it on my own, but I am beginning to believe it might be a program bug as
>I have been unable to solve the problem.
>
>I am having a problem displaying stimuli on a 2nd monitor. I have two
>monitors on my Mac and when I display stimuli on the 2nd monitor a couple of
>the grayscale values reverse, but not all. This does not happen when I run
>the program on the 1st monitor.

http://groups.yahoo.com/group/psychtoolbox/message/266

Dear Erin

The bug you reported more than a year ago is still outstanding. We have
created DrawTest to characterize the bug more precisely. DrawTest.m is
enclosed.

Here's part of the help text from that file, describing the bug and how
to work around it:

>At present, 4/1/02, on my G4 Titanium Powerbook running Mac OS 9.1, this
>test works fine for all real windows and for an offscreen window
>referenced to screen 0, but fails for an offscreen window referenced to
>screen 1. This is true both with no inits and with my normal complement of
>inits. However, enabling the inits does change the symptoms slightly. With
>no inits, at 8 and 16 bits FillRect and DrawText both fail, and at 32 bits
>nothing fails. With inits, at 8 bits DrawText fails, and at 16 or 32 bits
>FillRect, DrawText, FrameRect, and Drawline all fail (always write 0).
>PutImage and CopyWindow never fail.
>
>Until we fix this, you should use only SCREEN PutImage and CopyWindow to
>draw to an offscreen window that is not referenced to screen 0. You can
>use the full set of SCREEN drawing operators in any onscreen window and in
>any offscreen window that is referenced to screen 0. Once you've created
>an image there, you can use CopyWindow to copy it to any offscreen window.
>(We haven't tested offscreen windows referenced to screen -1, i.e. none.)

This advice is similar to, but more specific than, the advice that David
Brainard
gave you at the time of the original bug report, in the linked message
above.

This new DrawTest.m will be included in the forthcoming release of
psychtoolbox version 2.5.

best

denis



NOTE TO ALL: denis.pelli@... is my preferred email address. Please
use that address. My "verizon.net" address will go away soon, partly
because Verizon forces me to use that as my "From:" address. My current
email program won't allow me to designate a separate "Reply-to:" address.