[PyOpenGL-Users] off-screen rendering and/or shutting down GLUT
Brought to you by:
mcfletch
From: Maciej K. <ma...@dg...> - 2005-11-18 02:21:03
|
Hello all, I'm trying to do some off-screen rendering in my app. Alas, from what I understand, GLUT does not (yet) support off-screen rendering. GLX and WGL do, IIRC, but these APIs are not exposed by pyopengl. Is there some way I can achieve off-screen rendering using just GL/GLU calls in pyopengl? For now I've settled for rendering on-screen with GLUT, but would like to shut down the GLUT/OpenGL system when I've done the render (need to return control to my app). Currently I grab the image with glReadPixels in the GLUT display function, and immediately do glutDestroyWindow(), but this does not exit glutMainLoop() as I was hoping, but instead shuts down the whole app, which does not fit my needs. So how can I read the OpenGL framebuffer with pyopengl and return control to my main app? My app is mostly just a computational package, not a graphical app, one that uses OpenGL purely for terrain rasterization, and some other things, hence I do not want to structure the whole app around glutMainLoop() or equivalent... the routines I'm writing have to be drop-in replacements for the standard versions already in the application... -- Maciej Kalisiak <ma...@dg...> http://www.dgp.toronto.edu/~mac/ |