Display an animated grating using the new Screen(‘DrawTexture’) command.
In Psychtoolbox-3 Screen(‘DrawTexture’) replaces

This is a very simple, bare bones demo on how to do frame animation. For
much more efficient ways to draw gratings and gabors, have a look at
DriftDemo2, DriftDemo3, DriftDemo4, ProceduralGaborDemo, GarboriumDemo,
ProceduralGarboriumDemo and DriftWaitDemo.

CopyWindow vs. DrawTexture:

In the OS 9 Psychtoolbox, Screen (‘CopyWindow”) was used for all
time-critical display of images, in particular for display of the movie
frames in animated stimuli. In contrast, Screen(‘DrawTexture’) should not
be used for display of all graphic elements, but only for display of
MATLAB matrices. For all other graphical elements, such as lines, rectangles,
and ovals we recommend that these be drawn directly to the display
window during the animation rather than rendered to offscreen windows
prior to the animation.

see also: PsychDemos, MovieDemo

Path   Retrieve current version from GitHub | View changelog