On Fri, Jul 15, 2011 at 10:15 AM, greenmoss <ktygoo...@yoderhome.com> wrote:

> After reading the responses in this thread relating how to handle
> saving pyglet game state using pickle, the general idea seems to be
> "don't do it that way", with various implementations of how to save
> state while avoiding pickling pyglet objects. The solution I have been
> using, eg getstate/setstate has so far worked for me, so this is
> probably what I will continue to use.
>
> However, while hopefully not sounding too presumptuous, it strikes me
> that in theory and in practice a framework such as pyglet tries to
> make it easier for game developers by providing convenience methods
> for common back-end chores. Gracefully handling pickle and unpickle
> requests seems to me compatible with this goal[1]. Am I
> misunderstanding the aims of the pyglet project?
>

If it is indeed a common need, then yes, I think it would be desirable to
handle it.


> [1] Note that I'm making no claims or demands about implementation.
> Instead I am opining that it is *desirable*. Rebuttals are of course
> welcome.


I am not actually clear on what the semantics of pickling OpenGL objects
looks like. Do we:

a) pickle the file name, and hope that the file is still present when we
unpickle to reload the texture from, or
b) readback the actual data from the graphics card, and pickle that?

Also keep in mind that we need to support pickling vertex data if we support
pickling textures.

Further question: is is even legal to pickle objects that will fail to
unpickle depending on external state (missing image files, or
missing/incorrect OpenGL context).

-- 
Tristam MacDonald
System Administrator, Suffolk University Math & CS Department
http://swiftcoder.wordpress.com/

-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to pyglet-users@googlegroups.com.
To unsubscribe from this group, send email to 
pyglet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en.

Reply via email to