But they are different things, right? GL calls are drawing triangles,
while background and foreground batches are drawing sprites. It looks
like this:

        self.batch_bkg.draw()

        self.objects.player.update()

        self.objects.grass.update()

        self.objects.grass.draw()

        for bug in self.objects.bugs:
            bug.update()

        self.batch.draw()

Grass is the one using OpenGL. I've tried with a smaller background
image and I get the same fps drop. It seems that pyglet does not like
mixing two batches and OpenGL triangles (well, obviously I'm doing
something wrong).

Um... I've tried sorting those lines, so updates take place before
drawing:

        wind = self.objects.player.update()
        self.objects.grass.update(wind)
        for bug in self.objects.bugs:
            bug.update()

        self.batch_bkg.draw()
        self.objects.grass.draw()
        self.batch.draw()

And now it seems I'm getting 30fps! Does it make sense? Is it because
some context change?
--~--~---------~--~----~------------~-------~--~----~
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