On Wed, Dec 24, 2008 at 2:43 PM, Steve <[email protected]> wrote:
>
> Would it be possible to render a TileableTexture as part of a batch?
> My game's tiled background is currently the only non-batched render
> item. I checked the documentation and couldn't see a good way to do it.

You need to subclass pyglet.graphics.Group to perform relevant state
changes (probably just binding the texture), then add a vertex list to
the batch containing the four points of the quad and their texture
coordinates (you can see how TileableTexture calculates these).

If this is your only non-batched render item though you're not likely
to get a performance win from this, though (assuming you only have one
background); so I'd only do this if you're some kind of batch purist
;-)

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