android - Rotate individual polygons in an Open GL vertex array? -


I am working on Android games for the use of OpenGL ES, and I have participated in a demonstration problem .

What I'm trying to do : I have a bunch of objects on the screen that share all the same mesh, but everyone has individual rotation and translations. You can compare it to the exteroids, where there is a bunch of asteroids roaming around the screen.

The real problem : I am taking performance hits because I rotate every object and translate each object separately, and the upper part of sending the summit array is very much Large, number of its equal (number of them per object).

What can I do? I have thought that a solution is to update the vertical in the software, before putting them in the top buffer. It probably will leave me some uppercase, but it seems the defendant.

Please share any thoughts or suggestions with you! Thanks! "Top-header overhead" You believe that you have side-buffers for server-side / index If this is the case, then GLES Details of 1.1, see section 2.9 of "buffer objects".

Of course, even if you are using server-side buffers, enough small enough GlDrawElements calls can easily be a performance barrier.

If all of your objects are stable, you can pre-converting them all and giving NX memory on the server.

> If your objects are moving, things are more difficult "Instinct" drawings (for example, see DrawInstanced of DirectX) can help, but I do not believe It would have been anything like that in GLES ("instant" drawing will also save memory in a steady state). Using GLES 2.0, you can try doing something like this:

  • By inserting M copies of the net into the top buffer, give each head an additional feature, which is the symbol of the copy <
  • M can call > glDrawElements , each time the matrix in the uniform array Can. It is not clear that it will be really fast, because (for one) the hardware must work hard (indexed uniforms are not super-cheap). Besides, I do not think there is anything that is possible in GLES 1.1.


Comments