|
49 | 49 | % When true test synchronization to retrace upon open. Defaults to |
50 | 50 | % global preference (usually true). See 'Screen SkipSyncTests?' |
51 | 51 | PtbSyncTests |
| 52 | + % When on, the PsychImaging pipeline is activated and a virtual |
| 53 | + % framebuffer is used |
| 54 | + VirtualFramebuffer matlab.lang.OnOffSwitchState = 'off' |
52 | 55 | end |
53 | 56 |
|
54 | 57 | properties (SetAccess = protected) |
@@ -283,8 +286,16 @@ function open(obj) |
283 | 286 | % Perhaps this shouldn't be set after setting 'Verbosity'? |
284 | 287 |
|
285 | 288 | % setup screen window |
286 | | - obj.PtbHandle = Screen('OpenWindow', obj.ScreenNum, obj.BackgroundColour,... |
287 | | - obj.OpenBounds, obj.PxDepth); |
| 289 | + if obj.VirtualFramebuffer == "on" |
| 290 | + % Enable imaging pipeline and virtual framebuffer |
| 291 | + PsychImaging('PrepareConfiguration'); |
| 292 | + PsychImaging('AddTask', 'General', 'UseVirtualFramebuffer'); |
| 293 | + obj.PtbHandle = PsychImaging('OpenWindow', ... |
| 294 | + obj.ScreenNum, obj.BackgroundColour, obj.OpenBounds, obj.PxDepth); |
| 295 | + else |
| 296 | + obj.PtbHandle = Screen('OpenWindow', ... |
| 297 | + obj.ScreenNum, obj.BackgroundColour, obj.OpenBounds, obj.PxDepth); |
| 298 | + end |
288 | 299 | obj.PxDepth = Screen('PixelSize', obj.PtbHandle); |
289 | 300 | obj.Bounds = Screen('Rect', obj.PtbHandle); |
290 | 301 |
|
|
0 commit comments