I figured it out.  Pyglet doesn't restore the texture bound before the
call to batch.draw().  Also, Lepton doesn't appear to bind texture(s)
in each draw call.

Saving and restoring the bound texture for each call to Pyglet fixes
the rendering in my example script:

@win.event
def on_draw():
        win.clear()
        glLoadIdentity()

        if drawSprite:
                previousTexture = GLint()
                glGetIntegerv( GL_TEXTURE_BINDING_2D, previousTexture )
                batch.draw()
                glBindTexture( GL_TEXTURE_2D, previousTexture.value )
        default_system.draw()

Thoughts on a better solution, or would this possibly be a good thing
to patch into Pyglet and/or Lepton?

-- 
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