Once you have drawn everything that does not change to buffer, you can
save everything in the buffer as single image data object like so:

from pyglet import image
my_background =
image.get_buffer_manager().get_color_buffer().image_data

#draw the background
my_background.blit(0,0)

I've also found that if you've been using gl to draw your objects,
it's important to reset the glColor3f to white before blitting. This
is because glColor3f seems to serve as a general color filter of what
to draw to screen, and (1,1,1) designates that all channels may be
drawn.

On Jan 1, 10:46 pm, "Richard Jones" <[EMAIL PROTECTED]> wrote:
> I've not been paying close attention to this thread so I might be
> off-topic... but there's some render-to-texture code in the wydget code in
> pyglet's SVN repos. Look in pyglet/contrib/wydget/wydget/util.py for
> renderToTexture. It's pretty specific to wydget's use-case (which was about
> rendering text, oddly enough) but you might be able to use it for something.
>
> I stopped using render-to-texture in wydget because it was fiddly and didn't
> really give enough speed benefit over just calling the text draw()  method
> for the additional complexity.
>
>      Richard
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to