You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are a couple of tasks that are always necessary to do with Screen('OpenWindow'); most prominently, it sets the windowPtr and screenDims in settings.device. This should be factored out for general ease of usage, and for preventing some simple errors.
What simple errors? For example, almost all scripts use screen.device.screenDims(3:4) as width and height. But this is only correct as long as the top-left pixel of PTB's screen is (0, 0)! The actual width and height are [dims(3) - dims(1), dims(4) - dims(2)].
Screen('CloseWindow') doesn't present many problems, but having a shutdown script that unsets relevant settings.device values would be a good complement.
The text was updated successfully, but these errors were encountered:
There are a couple of tasks that are always necessary to do with
Screen('OpenWindow')
; most prominently, it sets thewindowPtr
andscreenDims
insettings.device
. This should be factored out for general ease of usage, and for preventing some simple errors.What simple errors? For example, almost all scripts use
screen.device.screenDims(3:4)
as width and height. But this is only correct as long as the top-left pixel of PTB's screen is(0, 0)
! The actual width and height are[dims(3) - dims(1), dims(4) - dims(2)]
.Screen('CloseWindow')
doesn't present many problems, but having a shutdown script that unsets relevantsettings.device
values would be a good complement.The text was updated successfully, but these errors were encountered: