Multisampling doesn't work - why? [Win7, PTB3, 2020a, TeamViewer]

I’m drawing a set of polygons with the command
Screen(‘FillPoly’, windowPtrNumber, color, polygonPoints)
called as many times as many polygons I have. However, they are not anti-aliased, so I call
PsychImaging(‘OpenWindow’, screenNumber, color,[],[],[],[],16)
before, where ‘16’ serves as an input for multisampling. According to this page of the documentation and to the contents of ‘help AntiAliasing’ this should result in anti-aliased edges, however this is not happening. Why?

My setup is:

  • PTB 3.0.16 - Flavor: beta - Corresponds to SVN Revision 10582
  • Windows 7, Service Pack 1 (Version 6.1.7601)
  • Matlab 9.8.0.1323502 (R2020a)

Additional info:

  1. Before everything I call these too:
    PsychDefaultSetup(2)
    Screen(‘Preference’, ‘SkipSyncTests’, 1),
    the reason being is that I’m new to PTB and I copied code from my colleague’s code. Could these lines be the culprit? If yes, what should I change for multisampling to work?
  2. Since I’m working remotely I am using TeamViewer to log into the system I’m using. This results in virtual screens being used by PTB. Could this be the culprit?

TeamViewer sounds like a likely cause.
PTB tells you in its output if it could enable anti-aliasing and with how many samples (graphics card+driver dependent).

Try if this way of opening a window works to defeat TeamViewer if that would be the culprit:

PsychImaging(‘PrepareConfiguration’);
PsychImaging(‘AddTask’,‘General’,‘UseVirtualFramebuffer’);
win = PsychImaging(‘OpenWindow’, screenNumber, color,[],[],[],[],16)

1 Like

Yup, it worked! Many thanks! :slight_smile: