如何避免在鼠标悬停时激活GLUT窗口

时间:2013-07-05 07:25:05

标签: python hover mouse glut activation

在下面的Python程序中,使用PyOpenGL和GLUT,只需将鼠标悬停在它们上面即可激活连续的GLUT窗口。 我怎么能避免这种情况?

from OpenGL.GL import *
from OpenGL.GLU import *
from OpenGL.GLUT import *

glutInit ()
glutInitDisplayMode (GLUT_RGB)
glutInitWindowSize (600, 400)

def displayFunc ():
    glClearColor (1, 1, 1, 1)       
    glClear (GL_COLOR_BUFFER_BIT)   

windows = []
for i in range (3):
    window = glutCreateWindow ('GLUT window {0}'.format (i))
    glutDisplayFunc (displayFunc)

glutMainLoop ()

我正在使用Windows Vista,Python 2.7和PyOpenGL 3.0.2

0 个答案:

没有答案