# Stereo 3d display with OpenGL rendering

**URL:** <https://psychtoolbox.discourse.group/t/stereo-3d-display-with-opengl-rendering/1816>\
**Category:** Uncategorized\
**Created:** [May 7, 2007, 1:53pm UTC](https://psychtoolbox.discourse.group/t/stereo-3d-display-with-opengl-rendering/1816 "2007-05-07T13:53:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pmineault2](https://avatars.discourse-cdn.com/v4/letter/p/848f3c/32.png) [@pmineault2](https://psychtoolbox.discourse.group/u/pmineault2)\
**Post date:** [May 7, 2007, 1:53pm UTC](https://psychtoolbox.discourse.group/t/stereo-3d-display-with-opengl-rendering/1816/1 "2007-05-07T13:53:57Z")

</div>

Hi,  
  
I've looked at the demos for stereo display using the Anaglyph (6-9)  
mode. I've also played with the OpenGL teapot demo. I tried to set up  
two OpenGL cameras and send the render outputs to the two sub-buffers  
of the stereo modes (ie, using SelectStereoDrawBuffer), based on the  
teapot demo. It seems (at least from what I've tried so far) that  
SelectStereoDrawBuffer doesn't have any effect once BeginOpenGL has  
been called. Now I've taken a look at  
[http://www.kyb.mpg.de/bu/people/qvuong/CGV05.html](http://www.kyb.mpg.de/bu/people/qvuong/CGV05.html) and I think I could  
render the same scene with two cameras into two off screen buffers and  
blend the two manually in the 0 OpenWindow mode, bypassing the  
built-in Anaglyph display method completely. The problem with that is  
that I'm only using the Anaglyph display for test purposes, and the  
real experiment is going to take place with polarizing glasses. So the  
best for me would be to use the 9 display mode for test purposes and  
simply change the value to 2 in the real experimental setup, but I'd  
also like to use the 3d OpenGL rendering facilities.  
  
So, has anyone had any experience using both OpenGL 3d rendering and  
the various stereo display modes of OpenWindow? Is it even possible?  
If so, does anyone have some demo code I could look at to get started?  
Thanks,  
  
Patrick Mineault
