예제 #1
0
    def resizeGL(self, width, height):
        QGLWidget.resize(self, width, height)

        glViewport(0, 0, self.width(), self.height())
        #        glViewport(0, 0, width, height)
        glMatrixMode(GL_PROJECTION)
        glLoadIdentity()
        gluPerspective(70, 1.0 * self.width() / self.height(), 0.1, 1000.0)
        gluLookAt(100, 100, 100,
                  0, 0, 0,
                  0, 1, 0)
        glMatrixMode(GL_MODELVIEW)
        glLoadIdentity()