BTW, changing part of my modified version of your example as follows, I can confirm your earlier statement that importing pyglet.gl has a side effect (locking the window re dragging) which is not mediated by its redefinition of all the gl*/GL* globals:
def _import_gl_raw(use_pyglet): global glMultMatrixf, glClearColor, glShadeModel, glTranslated, glClear global glColor3f, glLoadIdentity, glScalef, glVertex3f, glNormal3f global glBegin, glEnd, glFlush, GLfloat, glViewport, glMatrixMode, glFrustum global GL_TRIANGLES, GL_FLAT, GL_COLOR_BUFFER_BIT, GL_PROJECTION, GL_MODELVIEW global glmult if use_pyglet: ## from pyglet.gl import * from pyglet.gl import glMultMatrixf, glClearColor, glShadeModel, glTranslated, glClear from pyglet.gl import glColor3f, glLoadIdentity, glScalef, glVertex3f, glNormal3f from pyglet.gl import glBegin, glEnd, glFlush, GLfloat, glViewport, glMatrixMode, glFrustum from pyglet.gl import GL_TRIANGLES, GL_FLAT, GL_COLOR_BUFFER_BIT, GL_PROJECTION, GL_MODELVIEW def glmult(l): return glMultMatrixf( (GLfloat * len(l))(*l) ) ## pwin = pyglet.window.Window(resizable=True) else: ## from OpenGL.GL import * from OpenGL.GL import glMultMatrixf, glClearColor, glShadeModel, glTranslated, glClear from OpenGL.GL import glColor3f, glLoadIdentity, glScalef, glVertex3f, glNormal3f from OpenGL.GL import glBegin, glEnd, glFlush, GLfloat, glViewport, glMatrixMode, glFrustum from OpenGL.GL import GL_TRIANGLES, GL_FLAT, GL_COLOR_BUFFER_BIT, GL_PROJECTION, GL_MODELVIEW def glmult(l): return glMultMatrixf( l ) def _import_gl(): _import_gl_raw( 'PYGLET' in os.environ) # do the import pyglet.gl _import_gl_raw( False) # then change the globals gl*/GL* back to what they were (bug still present on my Mac) - Bruce --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pyglet-users" group. To post to this group, send email to pyglet-users@googlegroups.com To unsubscribe from this group, send email to pyglet-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en -~----------~----~----~----~------~----~------~--~---