It looks like you are using an image file with more than one image on it.  
When the texture rotates, OpenGL blends some of the pixels together so that 
the rotated result looks smooth, not pixelated.  Unfortunately, in your 
case, the edge of another image is blending into the image you're trying to 
draw.  The solution is to put some transparent padding between the image.  
If you are using ImageGrid to load your images, you can use the 
column_padding and row_padding parameters to load a padded grid.  See this 
documentation 
<https://pyglet.readthedocs.org/en/pyglet-1.2-maintenance/api/pyglet/image/pyglet.image.ImageGrid.html#pyglet.image.ImageGrid>
 
for more.

Does that help?

On Thursday, July 9, 2015 at 11:31:47 AM UTC-4, NiBE wrote:
>
>
> <https://lh3.googleusercontent.com/-_Mou-22FHnI/VZ6TpSyUOmI/AAAAAAAAAAk/PfXTVXmguF4/s1600/1Elv8.png>
>
> Hi,
> I'm a newbie trying to learn pyglet, and I love it so far! 
> I have a stupid issue that I don't know how to fix.
> I try to rotate a simple sprite with this code:
>
>
>
> test_img = pyglet.resource.image('img.png') 
> self.test_sprite = pyglet.sprite.Sprite(img=test_img,x=300,y=400, 
> batch=self.main_batch) 
>
> def update(self, dt): 
>    self.test_sprite.rotation -= float(100 * dt)
>
> it works great, but I see artifact while it rotates, see the picture 
> below, the left is a static image, the right is the one rotating:
>
>
>
>
> I did a quick search and I find a discussion regarding it here:
>
> https://groups.google.com/forum/#!topic/pyglet-users/5NiNT1vRHGw
> But honestly I'm a newbie in pyglet and I don't get how should I amend the 
> code above to remove the artifact.
> Anyone can help me please?
>
> thanks a lot
>

-- 
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 pyglet-users+unsubscr...@googlegroups.com.
To post to this group, send email to pyglet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to