Is Psychtoolbox-3 compatible with PTB-2 (Mac or Win)

Q: Is PTB-3 compatible with PTB-2 (Mac or Win)?
Answer: Not compatible. But by modifying the code, it is also possible to make the program of PTB-2 run in PTB-3.
Reason: During the development of PTB-3, the imaging model of PTB-2 was bundled with Apple's QuickDraw, and could not work with OpenGL. For example, in OpenGL, a basic concept is buffer switching. The contents of the "front" buffer will be displayed when the user issues a command to affect the contents of the "back" buffer. This concept is not part of the PTB-2 imaging model. The result of this change is that if you do not insert the flip command screen ('flip',...) after the drawing operation, you will not see the result. If the user has been programming in PTB-2, it will take some time to adapt to this change.
However, if you must use the old code written for PTB-2, you can switch PTB-3 to a compatibility mode by adding the following command at the top of the script:
% Enable compatibility mode to old PTB-2:
Screen('Preference' ,'EmulateOldPTB', 1);
This will simulate the drawing model of PTB-2. All drawing commands will immediately point to the visible screen without the need for Screen('Flip',...) command.

This allows many old PTB-2 scripts to be run without further modification. However, there may be subtle differences between the drawing commands on PTB-2 and PTB-3, so this method cannot guarantee backward compatibility. Although PTB-3 is not backward compatible, it has many similarities with earlier versions. Converting old programs is not difficult, and the ever-growing collection of new demos provides examples.
Some notes and help texts in PTB-3 explain the differences between it and the old version, and the official is gradually trying to simplify these notes and help texts.

Reference: https://github.com/Psychtoolbox-3/Psychtoolbox-3/wiki/FAQ#explanation-of-screenflip-timestamps

#This article is organized by the BCIduino brain-computer interface open source community (public account "BCIduino brain-computer interface community"). The BCIduino brain-computer interface community was initiated by masters and doctors from Beijing University of Aeronautics and Astronautics, Cornell University, Peking University, Capital Medical University, etc. Welcome to scan the code below to join the community (if the code expires, you can add wechat: cheitech, request to join ), also welcome to purchase BCIduino EEG module (search for a certain treasure).
Insert picture description here

Guess you like

Origin blog.csdn.net/nvsirgn/article/details/108561156