Replace the glTranslatef on line 16:

    glTranslatef( xpos, ypos, 0 ) # move around

with:

    background.anchor_x = xpos
    background.anchor_y = ypos

The former offsets the whole background quad, thus exposing the black
behind it. The latter just tells pyglet to offset the texture
coordinates, which simply scrolls the texture inside the quad.

hth,

-Casey

On Sat, Mar 28, 2009 at 1:59 PM, Fred . <[email protected]> wrote:
>
> I create a script that;
> 1. Loads a image file.
> 2. Turns it into a tileable texture.
> 3. Puts that texture as background.
> 4. When I drag the mouse, it moves.
>
> Now when I resize or maximize the window, it does what it should, it
> keeps on tiling that background.
> The problem is that when I drag the mouse, to make it move, it does
> not keep on tiling that backgroud, it just shows black background
> instead.
> How can I make it keep tiling infinitely, so it never ends?
>
> http://pastebin.com/m1888acf
>
> >
>

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