Replace glutSwapBuffers()

Hi guys,

at the moment I’m working on a project which uses the NVIDIA 3D Vision Shutter glasses. To use those on linux os I need to use an eternal library which handles the shutter signal for the glasses via usb for me. To be precise it synchronizes the shutter rate of the glasses with the frame rate of the monitor.

To get the code for the glasses working I can’t use the standard glutSwapBuffers() method but need to call an method from the external library instead. Since OF is based on glut I guess it calls glutSwapBuffers() somewhere internally.

I’m struggling to find the right way to do this so your help would be very much appreciated :slight_smile:

GLUT window is deprecated, current version is using GLFW instead. You can have a look at ofAppGLFWWindow at the draw function you will find glfwSwapBuffers(windowP);

Also you can set stereo true at window settings in main.cpp:

ofGLFWWindowSettings settings;
settings.width = 600;
settings.height = 600;
settings.stereo = true;
shared_ptr<ofAppBaseWindow> mainWindow = ofCreateWindow(settings);
shared_ptr<ofApp> mainApp(new ofApp);
ofRunApp(mainWindow, mainApp);

i can’t try it but i guess it should work.