![]() This is how I initialise the sprite array (GLKViewController. Currently I call glDrawArrays(GL_TRIANGLE_STRIP, 0, 4) for each of the 50 sprites for each of the frames (target frame rate is 60) which is equally to 3000 calls per second.Ĭould that be the bottle neck ? How could I optimise this ? In the following sections I have listed the important parts of the program. I am wondering how I could optimise my program, since the frame-rate drops on my iPhone 4S to about 25 FPS when displaying 50 sprites (all with the same texture/png-file!) with a size of 128x128 px each. Currently I have been doing this: // In main: float mypoints new float 100 // Fill mypoints with some data to be drawn as a continuous line on the screen. I introduced a sprite class that can load png-files as textures, manipulate the sprite (SRT) and some additional properties like alpha blending and so on. Assuming that I can open an OpenGL context, please could you (a SO user reading this question) clarify all the steps required to render an array of points describing a line in OpenGL. I have an animated background layer that is built on top of OpenGL ES 2.0 and I am using GLKView as graphics container and GLKViewController as controller.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |