Jump to content

  • Log In with Google      Sign In   
  • Create Account

jmfurlott

Member Since 29 Jan 2013
Offline Last Active Jan 30 2013 08:11 PM

Posts I've Made

In Topic: Creating new triangles using GL_TRIANGLE_STRIPS

29 January 2013 - 06:59 PM

Depending on the hardware being targetted, strips may yet be the best choice; mobile hardware (this is GL ES after all) is particularly known for flying in the face of what works better elsewhere.  If you do want to retain strip order, then using indexing will let you do that and will nicely cover the case where you need to join two strips; this will be cheaper than adding extra verts to make degenerates as indices are smaller than vertices.  Indexing can also cover cases where you need to add free triangles into your mesh, or even add in some fans, and all without any messing and with just one draw call per mesh.

 

Primitive restart can also do that, but since you're on ES2 you don't have primitive restart available, so do at least try a benchmark with just indexed triangles as in general terms (and as L Spiro says) they are the general-case fastest path nowadays; if you run into performance problems with those (or if you are on a class of mobile hardware where you know for absolute certain that strips are preferred) then is the time to start considering strips, not before.

 

Essential reading here: http://hacksoflife.blogspot.ie/2010/01/to-strip-or-not-to-strip.html

 

 

Depending on the hardware being targetted, strips may yet be the best choice; mobile hardware (this is GL ES after all) is particularly known for flying in the face of what works better elsewhere.  If you do want to retain strip order, then using indexing will let you do that and will nicely cover the case where you need to join two strips; this will be cheaper than adding extra verts to make degenerates as indices are smaller than vertices.  Indexing can also cover cases where you need to add free triangles into your mesh, or even add in some fans, and all without any messing and with just one draw call per mesh.

 

Primitive restart can also do that, but since you're on ES2 you don't have primitive restart available, so do at least try a benchmark with just indexed triangles as in general terms (and as L Spiro says) they are the general-case fastest path nowadays; if you run into performance problems with those (or if you are on a class of mobile hardware where you know for absolute certain that strips are preferred) then is the time to start considering strips, not before.

 

Essential reading here: http://hacksoflife.blogspot.ie/2010/01/to-strip-or-not-to-strip.html

 

Ah my question was already answered (didn't see this before replying).  Thank you guys...seems like normal triangles are the way to go for now.  I don't indices are good for my model because (based on input) they are continually changing.


In Topic: Creating new triangles using GL_TRIANGLE_STRIPS

29 January 2013 - 06:57 PM

You may want to also test if triangle strips are really best for you in the first place.

 

 

Also, your mobile device uses a unified memory model, which means bandwidth is irrelevant, which means that by using triangle strips you only increase the triangle count and decrease the cache performance.  The only way in which triangle strips help you is in decreasing bandwidth, but on mobile devices there is no bandwidth issue in the first place, which means triangle strips are really just a way of shooting yourself in the foot.  You get all of the bad and none of the good.

 

Whoa that is incredible. Thank you so much. I will first construct it using triangles.  I was just getting such terrible performance using strips and this could be way.  I will reconstruct my data using just standard GL_TRIANGLES.  

 

Do you have any more information about this bandwidth issue?

 

Thank you!

 

-jmfurlott


PARTNERS