On 12/23/08, Mic Pringle <[email protected]> wrote:
>
>  Hi,
>
>  This issue is driving me mad so I'm reaching out the pyglet community
>  to see if they can help me :-)
>
>  The code below draw a 10 x 10 grid of squares 64px in size, and it all
>  works except the texture mapping part. All I get is grey squares, or
>  white when the mouse moves over them. These colors are set on the line
>  where the mouse position is tested, and are meant to alter the blend
>  color of the texture. Can anyone see why the texture isn't mapping ?
>
>  I've tried loading different images and formats, and also loaded the
>  same image as a sprite and displayed that (see below) just to make
>  sure the image is being loaded okay and that works so I'm really
>  starting to pull my hair out ...

>  def draw_grid():

You need to glEnable(GL_TEXTURE_2D) each time here.  Drawing the
sprite disables it, as pyglet assumes (perhaps unwisely) that this is
the default state.

Alternatively, comment out the sprite.draw().

Alex.

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