Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualBrother Bob

Posted 22 July 2013 - 12:34 PM

I've been staring at your code and the attached image for quite some time now and I'm convinced that you should not be using glDrawElements for this type of rendering.  Many of your vertices are standing out on their own.  Using an index buffer only offers optimization if calculations on redundant points can be eliminated, this only happens if your model has many triangles that share vertices with other triangles.  Also, you will have to process all the newly created geometry to determine whether or not points are being shared and then recalculate the index buffer every time more geometry is added, this is going to offset any performance benefit that glDrawElements offers since your doing more math just to use this function.  I'd suggest you use glDrawArrays instead.   Here's a quote from an Apple document: " ..an indexed triangle list requires additional memory for the indices and adds overhead to look up vertices." http://developer.apple.com/library/ios/#documentation/3ddrawing/conceptual/opengles_programmingguide/TechniquesforWorkingwithVertexData/TechniquesforWorkingwithVertexData.html After reading about someone else's problems with indices I decided to try the following. I entered the number 1000 to -> glBindBuffer(GL_ARRAY_BUFFER, 1000); in a program that only has a few dozen models and it not only crashed the program, it took down VirtualBox OS emulator running Windows7 instantly. Very nasty.


#6marcClintDion

Posted 22 July 2013 - 03:18 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.


#5marcClintDion

Posted 07 June 2013 - 05:22 AM

I've been staring at your code and the attached image for quite some time now and I'm convinced that you should not be using glDrawElements for this type of rendering.  Many of your vertices are standing out on their own.  Using an index buffer only offers optimization if calculations on redundant points can be eliminated, this only happens if your model has many triangles that share vertices with other triangles.  Also, you will have to process all the newly created geometry to determine whether or not points are being shared and then recalculate the index buffer every time more geometry is added, this is going to offset any performance benefit that glDrawElements offers since your doing more math just to use this function.  I'd suggest you use glDrawArrays instead.
 
Here's a quote from an Apple document: " ..an indexed triangle list requires additional memory for the indices and adds overhead to look up vertices."

http://developer.apple.com/library/ios/#documentation/3ddrawing/conceptual/opengles_programmingguide/TechniquesforWorkingwithVertexData/TechniquesforWorkingwithVertexData.html

After reading about someone else's problems with indices I decided to try the following. I entered the number 1000 to -> glBindBuffer(GL_ARRAY_BUFFER, 1000); in a program that only has a few dozen models and it not only crashed the program, it took down VirtualBox OS emulator running Windows7 instantly. Very nasty.

#4marcClintDion

Posted 06 June 2013 - 07:15 PM

I've been staring at your code and the attached image for quite some time now and I'm convinced that you should not be using glDrawElements for this type of rendering.  Many of your vertices are standing out on their own.  Using an index buffer only offers optimization if calculations on redundant points can be eliminated, this only happens if your model has many triangles that share vertices with other triangles.  Also, you will have to process all the newly created geometry to determine whether or not points are being shared and then recalculate the index buffer every time more geometry is added, this is going to offset any performance benefit that glDrawElements offers since your doing more math just to use this function.  I'd suggest you use glDrawArrays instead.
 
Here's a quote from an Apple document: " ..an indexed triangle list requires additional memory for the indices and adds overhead to look up vertices."

http://developer.apple.com/library/ios/#documentation/3ddrawing/conceptual/opengles_programmingguide/TechniquesforWorkingwithVertexData/TechniquesforWorkingwithVertexData.html

#3marcClintDion

Posted 06 June 2013 - 07:15 PM

I've been staring at your code and the attached image for quite some time now and I'm convinced that you should not be using glDrawElements for this type of rendering.  Many of your vertices are standing out on their own.  Using an index buffer only offers optimization if calculations on redundant points can be eliminated, this only happens if your model has many triangles that share vertices with other triangles.  Also, you will have to process all the newly created geometry to determine whether or not points are being shared and then recalculate the index buffer every time more geometry is added, this is going to offset any performance benefit that glDrawElements offers since your doing more math just to use this function.  I'd suggest you use glDrawArrays instead.
 
Here's a quote from an Apple document: " ..while an indexed triangle list requires additional memory for the indices and adds overhead to look up vertices."

http://developer.apple.com/library/ios/#documentation/3ddrawing/conceptual/opengles_programmingguide/TechniquesforWorkingwithVertexData/TechniquesforWorkingwithVertexData.html

#2marcClintDion

Posted 06 June 2013 - 07:13 PM

I've been staring at your code and the attached image for quite some time now and I'm convinced that you should not be using glDrawElements for this type of rendering.  Many of your vertices are standing out on their own.  Using an index buffer only offers optimization if calculations on redundant points can be eliminated, this only happens if your model has many triangles that share vertices with other triangles.  Also, you will have to process all the newly created geometry to determine whether or not points are being shared and then recalculate the index buffer every time more geometry is added, this is going to offset any performance benefit that glDrawElements offers since your doing more math just to use this function.  I'd suggest you use glDrawArrays instead.
 
Here's a quote from an Apple document: " ..while an indexed triangle list requires additional memory for the indices and adds overhead to look up vertices.

http://developer.apple.com/library/ios/#documentation/3ddrawing/conceptual/opengles_programmingguide/TechniquesforWorkingwithVertexData/TechniquesforWorkingwithVertexData.html

PARTNERS