1 """Can we show a mussa gl object?
5 from OpenGL.GLUT import *
6 from OpenGL.GL import *
12 """Initalize our data and our glut window"""
13 # make up a simple sequence
14 self.s = "AAGGCCTT" * 5
15 self.seq = mussa.Sequence(self.s)
16 # AnnotationColors is required, even though it'd be nice
18 self.glseq = mussa.GlSequence(self.seq, mussa.AnnotationColors())
19 assert len(self.s) == self.glseq.length
21 # set up opengl buffer
23 glutInitDisplayMode(GLUT_RGBA | GLUT_DEPTH )
24 glutCreateWindow('mussa')
27 glOrtho(-10, len(self.s)+10, -50, 50, -50, 50)
29 glutDisplayFunc(self.display)
33 """Update showing buffer"""
34 glClear(GL_COLOR_BUFFER_BIT)
35 self.glseq.draw(-50, self.glseq.width+50)
38 if __name__ == "__main__":