You are probably right, but in this case it doesn't help.
glBindTexture is never called before glTexParameter*() on the particle
texture, unless it is the only thing being rendered.  Even calling
group.draw() before batch.draw() doesn't help.

FYI, I built a little workaround for this problem that doesn't require
me to sprinkle texture-reverting code thoughout my drawing code.  I'm
subclassing SpriteTexturizer and calling set_state() twice, to ensure
that the glTexParameter() calls are made to the correct texture.

class SpriteTexturizer2(SpriteTexturizer):
        def set_state(self):
                SpriteTexturizer.set_state( self )
                glPopAttrib()
                SpriteTexturizer.set_state( self )

On Feb 16, 8:07 pm, Richard Jones <[email protected]> wrote:
> On Wed, Feb 17, 2010 at 12:16 PM, Mike Wyatt <[email protected]> wrote:
> > Ah, perfect.  That explains why toggling sprite rendering in my sample
> > makes the particle rendering work.  By restoring the previous texture
> > before rendering the particle group, the correct texture is bound for
> > the calls to glTexParameteri().
>
> I thought glTexParameter* invocations were sticky - so done once to a
> texture should be enough. Perhaps not.
>
>       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