Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualBrother Bob

Posted 22 July 2013 - 12:33 PM

There can be a substantial improvement when implementing glDrawElements vs. glDrawArrays, but not in all cases. If you have a lot of non-contiguous mesh then there may actually be a performance hit. Particles, for instance. There has to be lots of duplicate vertices for the index tracking method to improve performance because there is additional calculation overhead. I'm not sure that the extra memory used is much of a problem these days since fast, cheap ram is standard issue now. What 'BornToCode' said about using indices to break up multi-component models into pieces is something to consider, however if you do this, pay close attention to getting the index count perfect or you will likely see horrible crashes. There is a document called 'OpenGL ES Programming Guide for iOS' that has some advice on this matter. http://developer.apple.com/library/ios/#documentation/3ddrawing/conceptual/opengles_programmingguide/TechniquesforWorkingwithVertexData/TechniquesforWorkingwithVertexData.html Here's an nVdia document with many ideas for optimizations. http://http.developer.nvidia.com/GPUGems/gpugems_ch28.html Remember that their are now half a dozen excellent GPU companies and they all have different ways of doing things under the hood, even though the interfaces are mostly the same. What works best on one may not work best on all of them. That Apple document suggests that you try both ways and see what works best for your situation.


#2marcClintDion

Posted 22 July 2013 - 03:20 AM

There is far too much arrogance and out right abuse by site moderators, they are teaching other people to behave this way.  The posts I've made will all be shorty removed and replaced with this notice.  Game development is not the only thing being taught here, bad behavior is being taught as well.


#1marcClintDion

Posted 06 June 2013 - 07:08 PM

There can be a substantial improvement when implementing glDrawElements vs. glDrawArrays, but not in all cases. If you have a lot of non-contiguous mesh then there may actually be a performance hit. Particles, for instance. There has to be lots of duplicate vertices for the index tracking method to improve performance because there is additional calculation overhead. I'm not sure that the extra memory used is much of a problem these days since fast, cheap ram is standard issue now. What 'BornToCode' said about using indices to break up multi-component models into pieces is something to consider, however if you do this, pay close attention to getting the index count perfect or you will likely see horrible crashes.

There is a document called 'OpenGL ES Programming Guide for iOS' that has some advice on this matter.
http://developer.apple.com/library/ios/#documentation/3ddrawing/conceptual/opengles_programmingguide/TechniquesforWorkingwithVertexData/TechniquesforWorkingwithVertexData.html

Here's an nVdia document with many ideas for optimizations.
http://http.developer.nvidia.com/GPUGems/gpugems_ch28.html

Remember that their are now half a dozen excellent GPU companies and they all have different ways of doing things under the hood, even though the interfaces are mostly the same. What works best on one may not work best on all of them.

That Apple document suggests that you try both ways and see what works best for your situation.

PARTNERS