[PyOpenGL-Users] A puzzle regarding running PyOpenGL interactively
Brought to you by:
mcfletch
|
From: Perry G. <pe...@st...> - 2003-02-11 23:07:02
|
We have had problems with PyOpenGL for more recent releases of Redhat (e.g., 6.x,7.x, 8.x) that manifest themselves in odd ways. This is the simplest illustration of something that works for some OpenGL implementations and not others. If you start an interactive Python session and types the following sequence of commmands: >>> import OpenGL >>> from OpenGL.GL import * >>> from OpenGL.Tk import * >>> o=Opengl() >>> Exception in Tkinter callback Traceback [...] AttributeError: 'Opengl' instance has no attribute 'redraw' [window turns pink] >>> glClearColor(1,0,0,0) >>> glClear(GL_COLOR_BUFFER_BIT) On some installations, this results in a Tk window appearing, and the last command changes the background color to red. On other installstions, nothing happens with the last command. (Nor does the window turn pink on o=Opengl()). The above will not work for the default installations of OpenGL for Redhat 8 for example (The SGI library apparently). [A natural question is why anyone would run OpenGL in this manner. We use OpenGL to generate plot windows from an interactive command line for a scientific command-line-oriented analysis environment. We do not use it in the usual way of generating a standalone GUI application. The above test illustrates the installations for which the plotting windows are nonfunctional or not] Does anyone understand what it is that causes PyOpenGL to stop working with Python's interactive mode? When we use Mesa instead on Redhat, it works. Unfortunately some users have NVIDIA cards that require the NVIDIA OpenGL library which does not work. We would like to understand what the fundamental problem is and whether there is any solution. Thanks, Perry Greenfield |