Hello! I know this is going to be a quite general question, but I need to know if someone knows about this.
I have some objects which contain Sprites (yes, they contain Sprites, they are not Sprites): the player, enemies and a 800x600 background image. And then I have some objects that are drawn using OpenGL triangles in a vertex array. I have an strange performance problem. I have to draw all that in this order: first the background, in its own batch, then the OpenGL objects, with their vertex array, and then the player and enemies in their own batch. But certain combinations drop the fps rate quite a lot: player + enemies + opengltriangles -> more than 30fps background + player + enemies -> more than 30fps But then... background + player + enemies + opengltriangles... -> less than 15fps! It's just when I draw the background AND the opengl triangles when the fps rate drops. If I draw the background in the same batch as the player and enemies, I get 30fps (but then the opengl triangles are drawn in front of everything and that's not what I need). So, neither the background or the opengl triangles by themselves seem to be a problem... It's just when combined (like some funny Joker plan) So here are my questions: 1) Are there performance problems when mixing graphic batches and vertex arrays? 2) Could it be that the 800x600 image is too big? (I thought Sprites where just quads with a texture) I have to try using tiled smaller images. What is the best method for having a big background image? (no scroll, just a nice background) I hope there's no need for code, as it's quite a lot, but I may post it if needed. Thank you in advance. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
