VIEWPixx3D examples

Hello.
I’m trying to migrate some experiments from the PTB to psychopy. Most of them display stereo stimuli on a VIEWPixx3D using active shutter glasses. The documentation from VPixx is seriously lacking. Would anybody have examples of 3D displays using psychopy?
Furthermore if I try to start a window with stereoMode=1, I receive the following error:
A stereo window was requested but the graphics card does not appear to support GL_STEREO
Instead, I have tried opening a window at 120Hz and manually drawing each eye independently but this does not synchronise with the shutter glasses. I even tried to explicitly switch the eyes between each frame using “setVesaOutputSignalEye” but that did not work. I would appreciate if someone could provide me with some working code as a starting point.
Sorry if these are silly questions, I’m new to psychopy.
Thanks,
Baptiste

With help from VPixx I ended up writing this script which triggers the shutter glasses using blue lines at the bottom of the frame:

from psychopy import core, visual, event, clock
from pypixxlib.viewpixx import VIEWPixx3D
from pypixxlib._libdpx import DPxEnableVidLcd3D60Hz

my_device = VIEWPixx3D()
my_device.setVideoMode('C24')
my_device.setVideoVesaBlueline(True)
# my_device.setVesaWaveform('VOLFONI')
my_device.setVesaWaveform('NVIDIA')
my_device.updateRegisterCache()
DPxEnableVidLcd3D60Hz()

screen_resolution = [1920, 1080]
win = visual.Window(screen_resolution, screen=1, fullscr=True,
                    monitor="VIEWPixx3D", units="pix",
                    colorSpace='rgb255', waitBlanking=True,
                    color=(128, 128, 128), stereo=False)

hello = visual.TextStim(win=win, text='Hello')
world = visual.TextStim(win=win, text='World')

left_on = visual.Line(win=win,
                      start=(-960, -539),
                      end=(-480, -539),
                      lineWidth=1,
                      interpolate=0,
                      lineColor=(-255, -255, 255))
left_off = visual.Line(win=win,
                       start=(-479, -539),
                       end=(960, -539),
                       lineWidth=1,
                       interpolate=0,
                       lineColor=(-255, -255, -255))
right_on = visual.Line(win=win,
                       start=(-960, -539),
                       end=(+480, -539),
                       lineWidth=1,
                       interpolate=0,
                       lineColor=(-255, -255, 255))
right_off = visual.Line(win=win,
                        start=(481, -539),
                        end=(960, -539),
                        lineWidth=1,
                        interpolate=0,
                        lineColor=(-255, -255, -255))

vbl = clock.getTime()

while True:

    hello.draw()
    left_on.draw()
    left_off.draw()
    win.flip()

    my_device.updateRegisterCache()
    print(my_device.getVesaOutputSignalEye())
    print(1000 * (clock.getTime() - vbl))
    vbl = clock.getTime()

    world.draw()
    right_on.draw()
    right_off.draw()
    win.flip()

    my_device.updateRegisterCache()
    print(my_device.getVesaOutputSignalEye())
    print(1000 * (clock.getTime() - vbl))
    vbl = clock.getTime()

    keys = event.getKeys(keyList=['escape'])
    if (len(keys) > 0) and (keys[0] == 'escape'):
        break

core.quit()
win.close()

Hi Baptiste,

Thanks for getting in touch with VPixx with your questions, and sharing the outcome on this forum.
I’m glad our support team was able to help!

FYI, the support team at VPixx keeps an eye on the PsychoPy forums for questions related to our products, but sometimes we can be a bit slow to reply. If you or any PsychoPy users need quick assistance with our products and integrating them in PsychoPy, don’t hesitate to contact us directly at support@vpixx.com. We usually respond within a day.

Best,
Lindsey
VPixx Support Team member