[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] [PyGame + PyOpenGL] Setting Target Surface



I've just started playing around with Pygame w/ PyOpenGL. I'm making good progress, but I'm having trouble figuring out how to have PyOpenGL calls render to a surface other than the one returned by pygame.display.set_mode(...).

By default, everything I draw with the gl***() methods is drawn directly onto the back buffer. Calling pygame.display.flip() then flips the new image to the screen. What I'd like to do is render multiple scenes to seperate pygame.Surface objects, then render all the surfaces together onto the back buffer, then flipping the final image to the screen. This will be used for fade in/out transitions between game screens.

Any thoughts?