On 30/03/14 21:44, Richard Jones wrote:
> GL_TEXTURE_MIN_FILTER and GL_TEXTURE_MAG_FILTER are parameters on the
> texture object (in the OpenGL, not pyglet sense), something like:
>
> glTexParameteri(texture.target, GL_TEXTURE_MIN_FILTER, GL_NEAREST)
> glTexParameteri(texture.target, GL_TEXTURE_MAG_FILTER, GL_NEAREST)
>
> Nothing to do with the Sprite implementation Groups or contexts - the
> texture parameter is set on the texture and stays with the texture.
>
Mystery solved! I've tried that and it's correct.
I'm keeping my PixSprite for convenience, but just like this:
class PixSprite(pyglet.sprite.Sprite):
def __init__(self, *args, **kwargs):
super(PixSprite, self).__init__(*args, **kwargs)
gl.glTexParameteri(self._texture.target,
gl.GL_TEXTURE_MAG_FILTER, gl.GL_NEAREST)
gl.glTexParameteri(self._texture.target,
gl.GL_TEXTURE_MIN_FILTER, gl.GL_NEAREST)
Thanks a lot Richard!
--
jjm's home: http://www.usebox.net/jjm/
blackshell: http://blackshell.usebox.net/
--
You received this message because you are subscribed to the Google Groups
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.