https://github.com/functionally/opengl-dlp-stereo
https://github.com/functionally/opengl-dlp-stereo
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/functionally/opengl-dlp-stereo
- Owner: functionally
- License: mit
- Created: 2022-11-10T06:31:51.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-11-10T06:59:37.000Z (about 3 years ago)
- Last Synced: 2023-07-30T00:26:09.978Z (over 2 years ago)
- Language: Haskell
- Size: 271 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: ReadMe.md
- License: LICENSE
Awesome Lists containing this project
README
Functions for using DLP stereo with 3-D Ready Sync projectors and OpenGL
========================================================================
This Haskell package contains functions for rendering 3D stereo using DLP 3-D Ready Sync projectors and active-shutter stereo glasses. It also includes [a sample application](https://youtu.be/l3rZbMB2XjM) and notes regarding hardware setup for DLP. In particular, note that this technique does not require a graphics card that supports `GL_STEREO`.
The code conforms to the specification <> and is based on the implementation for the stereo movie viewer Bino <>.
Please report issues at <>.
Skeletal example illustrating the use of frame-sequential DLP
-------------------------------------------------------------
```haskell
main :: IO ()
main = do
_ <- getArgsAndInitialize
initialDisplayMode $= [WithDepthBuffer, DoubleBuffered]
_ <- createWindow \"DLP Stereo OpenGL Example\"
depthFunc $= Just Less
idleCallback $= Just (postRedisplay Nothing)
-- Use frame-sequential DLP encoding.
dlpDisplayCallback $= def {dlpEncoding = FrameSequential, doDisplay = display}
mainLoop
display :: DlpDisplayCallback
display eye = do
-- Shift the view slightly, depending on for which eye to draw.
translate $ Vector3 (if eye == LeftDlp then -0.05 else 0.05 :: GLfloat) 0 0
-- All of the rendering actions go here.
renderPrimitive . . .
```
Notes on hardware and software
------------------------------
This code has been validated with the following configuration of hardware and software:
* Optoma ML550 WXGA 500 Lumen 3D Ready Portable DLP LED Projector, running 120 Hz at 1024x768 resolution
* Optoma ZD302 DLP Link Active Shutter 3D Glasses
* Ubuntu 15.04, 64-bit
* NVIDIA Driver Version 340.93, with `xorg.conf` option `Stereo` set to `8`
* GHC 7.6.3
* OpenGL == 2.8.0.0
* GLUT == 2.4.0.0