Re: [PyOpenGL-Users] A puzzle regarding running PyOpenGL interactively
Brought to you by:
mcfletch
From: <il...@ya...> - 2003-02-11 23:33:52
|
I'm not sure about tk; but I use pygame interactively a lot. Maybe you need to call the buffer flip functions, or define a redraw function? In my code I have display objects with start, and stop video method calls. Which basically call pygame.display.init() and pygame.display.quit() ( which opens and closes the display). Then I have a draw method. This all works nicely with nvidia drivers on linux. I get the same behaviour with your tk example. Sorry I'm of not much help. --- Perry Greenfield <pe...@st...> wrote: > 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 > > > > __________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com |