On Thu, Nov 17, 2005 at 09:20:55PM -0500, Maciej Kalisiak wrote:
> 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?
Maciej,
I had the same problem. GL does not provide a direct solution yet. What
I did was "borrowing" a buffer. You can make two textures: one for the
screen you use, and one for off-screen rendering. By swapping the
textures you draw and show the two different images. I'm not a
programmer, so by implementation is a bit amateurish. Maybe someone has
a professional implementation.
>
> 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.
[...]
As far as I know is GLUT a bit limited. I use GL with GTK. GTK does the
window management and control. GL only the drawing. TK can do something
similar, and is better documented. I think I've seen some nice
programming examples for this. Check the documentation. WX will do the
job too, but WX has a very limited documentation. Pick your choice.
Succes,
Fulko
--
Fulko van Westrenen
vw...@vu...
|