Skip to content
Snippets Groups Projects
Commit 421cbcab authored by tobias's avatar tobias
Browse files

dokk: enable stereo

git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@1979 5a81b35b-ba03-0410-adc8-b2c5c5119f08
parent dd42e32a
No related branches found
No related tags found
No related merge requests found
...@@ -40,6 +40,8 @@ class Dokk(object): ...@@ -40,6 +40,8 @@ class Dokk(object):
def Start(self, args): def Start(self, args):
self.NextLevel() self.NextLevel()
self.gl_win.Show(fullscreen=('--fullscreen' in args)) self.gl_win.Show(fullscreen=('--fullscreen' in args))
if '--stereo' in args:
self.gl_win.SetStereo(1)
def _LoadLevel(self): def _LoadLevel(self):
if self._current_level is not None: if self._current_level is not None:
......
...@@ -156,6 +156,7 @@ class DokkGLWin(gfx.GLWinBase): ...@@ -156,6 +156,7 @@ class DokkGLWin(gfx.GLWinBase):
def _CreateFormat(self): def _CreateFormat(self):
fmt=QGLFormat() fmt=QGLFormat()
fmt.setAlpha(True) fmt.setAlpha(True)
fmt.setStereo(True)
return fmt return fmt
def __init__(self,dokk): def __init__(self,dokk):
...@@ -174,8 +175,8 @@ class DokkGLWin(gfx.GLWinBase): ...@@ -174,8 +175,8 @@ class DokkGLWin(gfx.GLWinBase):
else: else:
self.canvas.show() self.canvas.show()
def SetStereo(): def SetStereo(self, mode):
pass gfx.Scene().Stereo(mode)
def SetLockInput(self, lock): def SetLockInput(self, lock):
self.canvas.SetLockInput(lock) self.canvas.SetLockInput(lock)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment