Make your image have base-2 dimensions. For instance, 32 by 32 or 64 by 64.

-Kurt

On Tuesday, June 3, 2014 4:30:08 PM UTC-4, Linux4Bene wrote:
>
> Hi, 
>
>
> I'm making a simple game to get to know pyglet and opengl. 
> I uses vertices to draw a quad and I want to apply a texture to it. 
> However, the texture is drawn as a small part inside the figure at the 
> lower left. 
>
> Before I tried mapping the texture, I was looking into a way to create a 
> Sprite from the vertices, and have the Sprite take care of drawing the 
> texture. I'm not even sure that's possible. 
>
> It's a simple rectangle, yet I don't succeed in applying the texture 
> correctly. 
> What's wrong with my code? Does pyglet have other ways of mapping 
> textures? 
>
> The code: 
> http://pastebin.com/Xvy9PCdY 
> (You'll need a 40 by 40 png image for the texture, and you'll need to 
> adjust the resource path to test) 
>
> What it results in: 
> http://i59.tinypic.com/sgqozp.png 
>
>
> Thanks, 
> Bene 
>
>

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

Reply via email to