Vertex buffer generation and rendering iphone
Hey Guys.. i've been trying a bunch of stuff to speed up the rendering of my iphone game, I dont know how these big 3d/racing games are squeezing so much performance out of it! and im only making a 2D side scroller. I seem to be getting around 20-30fps depending on action, which I would really like a solid 30fps.
So one thing I wanted to do was to render all sprites that are the same (especially targed towards my particle system) at once, by malloc'ing some memory and adding all the verticies into that, then rendering the vertex buffer as an eg. tri strip, I tried several different tactics, but only managed to ever get the first sprite (two tris) to draw properly... I must be doing something fundamentally wrong, though im not sure what. Does anyone have some example code on how the managed to get this working? the help would be GREATLY appriecated.
Eli
So one thing I wanted to do was to render all sprites that are the same (especially targed towards my particle system) at once, by malloc'ing some memory and adding all the verticies into that, then rendering the vertex buffer as an eg. tri strip, I tried several different tactics, but only managed to ever get the first sprite (two tris) to draw properly... I must be doing something fundamentally wrong, though im not sure what. Does anyone have some example code on how the managed to get this working? the help would be GREATLY appriecated.
Eli
anyone?
It sounds like you'd actually want to use GL_TRIANGLES rather than GL_TRIANGLE_STRIP, unless all of your sprites happen to be directly connected. Other than that, your approach ought to work, assuming all of the sprites you're rendering use the same texture.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| New Apple Render to Vertex Buffer Sample | OneSadCookie | 13 | 6,670 |
Oct 15, 2006 01:10 AM Last Post: OneSadCookie |
|
| 2D Image Generation & openGL | LWStrike | 2 | 2,893 |
Mar 28, 2006 03:34 PM Last Post: OneSadCookie |
|
| stack overflow creating a vertex buffer? | LongJumper | 6 | 4,149 |
Jul 5, 2005 10:39 PM Last Post: PowerMacX |
|
| display list generation | honkFactory | 8 | 3,154 |
Mar 13, 2003 11:39 AM Last Post: honkFactory |
|

