开发者

OpenGL stereo in layered window

开发者 https://www.devze.com 2023-01-19 22:57 出处:网络
Is anybody aware of a way to enable OpenGL stereo开发者_StackOverflow社区 while using a layered window in Windows 7?I could be wrong, but I think the GL_{LEFT,RIGHT} are only for output devices that a

Is anybody aware of a way to enable OpenGL stereo开发者_StackOverflow社区 while using a layered window in Windows 7?


I could be wrong, but I think the GL_{LEFT,RIGHT} are only for output devices that are actually stereoscopic, such as VR goggles, shutter glasses, or layered screens with multiple polarized displays. Assuming you aren’t using any of these things, you will probably need to make your window twice as wide and use glViewport() to draw both aspects of the scene side-by-side. I’m assuming that your rendering pass is already happening twice for GL_LEFT and GL_RIGHT buffers, so you should just substitute glViewport() calls that target either side of the window in the place of the glDrawBuffer() calls.


OpenGL stereo uses the GL_BACK_LEFT and GL_BACK_RIGHT draw buffers, and you should only draw once to each buffer. You also need a Quadro card with quad-buffer stereo support to use this.

0

精彩评论

暂无评论...
验证码 换一张
取 消