Skip to content
Snippets Groups Projects
Commit 343c51c4 authored by marco's avatar marco
Browse files

added basic infrastructure for DOKK - the ultimate docking game

git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@1814 5a81b35b-ba03-0410-adc8-b2c5c5119f08
parent 6a64757a
No related branches found
No related tags found
No related merge requests found
#!/bin/sh
cat dokk.py | gosty Dokk $@
\ No newline at end of file
import glwin
from ost import gfx
from ost import io
sdh=io.LoadPDB('../entity/sdh.pdb')
go=gfx.Entity("sdh", sdh)
scene.Add(go)
dokk_win=glwin.DokkGLWin()
dokk_win.Show()
import math
from ost import gfx
from PyQt4.QtGui import *
from PyQt4.QtCore import *
from PyQt4.QtOpenGL import *
class DokkGLCanvas(QGLWidget):
def __init__(self, format, parent=None):
QGLWidget.__init__(self, format, parent)
def initializeGL(self):
gfx.Scene().InitGL()
def paintGL(self):
gfx.Scene().RenderGL()
def resizeGL(self, w, h):
gfx.Scene().Resize(w, h)
class DokkGLWin(gfx.GLWinBase):
def _CreateFormat(self):
fmt=QGLFormat()
fmt.setAlpha(True)
return fmt
def __init__(self):
gfx.GLWinBase.__init__(self)
self.canvas_=DokkGLCanvas(self._CreateFormat())
def DoRefresh(self):
self.refresh_=True
def Show(self):
self.canvas_.show()
def SetStereo():
pass
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment