opengl-dlp-stereo: Library and example for using DLP stereo in OpenGL

[ graphics, library, mit, program ] [ Propose Tags ]

This 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 (see <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.


[Skip to Readme]

Modules

[Index]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.2.5, 0.1.2.6, 0.1.4.1, 0.1.5.2, 0.1.5.4
Dependencies base (>=4.6 && <5), GLUT (>=2.4), OpenGL (>=2.8), vector (>=0.10) [details]
License MIT
Copyright (c) 2015 Brian W Bush
Author Brian W Bush <consult@brianwbush.info>
Maintainer Brian W Bush <consult@brianwbush.info>
Category Graphics
Home page https://bitbucket.org/bwbush/opengl-dlp-stereo
Bug tracker https://bwbush.atlassian.net/projects/HOGLDLP/issues/
Source repo head: git clone https://bwbush@bitbucket.org/bwbush/opengl-dlp-stereo.git
Uploaded by BrianBush at 2015-10-31T15:10:27Z
Distributions NixOS:0.1.5.4
Reverse Dependencies 1 direct, 1 indirect [details]
Executables opengl-dlp-test
Downloads 2912 total (17 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2016-11-30 [all 3 reports]

Readme for opengl-dlp-stereo-0.1.2.6

[back to package description]

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 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 <http://lists.gnu.org/archive/html/bino-list/2013-03/pdfz6rW7jUrgI.pdf> and is based on the implementation for the stereo movie viewer Bino <http://git.savannah.gnu.org/cgit/bino.git/tree/src/video_output.cpp?id=bino-1.6.1#n1389>.

Skeletal example illustrating the use of frame-sequential DLP

main :: IO ()
main = do
  _ <- getArgsAndInitialize
  initialDisplayMode $= [WithDepthBuffer, DoubleBuffered]
  _ <- createWindow "DLP Stereo OpenGL Example"
  depthFunc $= Just Less 
  dlp <- initDlp                                                         -- Initialize the DLP state.
  displayCallback $= display dlp                                         -- The display callback needs the DLP state.
  idleCallback $= Just (postRedisplay Nothing)                           -- The idle callback must force redisplay for frame-sequential encoding.
  mainLoop

encoding :: DlpEncoding
encoding = FrameSequential                                               -- Frame-sequential encoding is usually easiest to code.

display :: IORef DlpState -> DisplayCallback
display dlp = do
  clear [ColorBuffer, DepthBuffer]
  isLeftEye <- showEye' LeftDlp encoding dlp                             -- Determine whether to draw the view for the left or right eye.
  translate $ Vector3 (if isLeftEye then -0.05 else 0.05 :: GLfloat) 0 0 -- Shift the view slightly, depending on for which eye to draw.
  renderPrimitive . . .                                                  -- All of the rendering actions go here.
  drawDlp encoding dlp                                                   -- Draw the colored DLP reference line just before swapping framebuffers.
  swapBuffers

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