Does double buffering for the purpose of vertex streaming do anything in webgl?

334 views Asked by At

I am trying to render as many moving objects as I can with WebGL and I am updating objects position by glBufferData/glBufferSubData each frame.I found that it is recommended to use a double buffer to reduce synchronization issues between GPU and CPU: https://developer.apple.com/library/ios/documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/TechniquesforWorkingwithVertexData/TechniquesforWorkingwithVertexData.html and https://www.opengl.org/wiki/Buffer_Object_Streaming and google's webgl optimizationg slides.

So I have implemented double buffering and it is drawing as expected. However, there was no performance gains. (In fact it made it slower) So I am curious if the double buffer technique described in the above 3 documents is approriate for webgl.

Here is basically what I am doing (capture by webgl inspector):

frame X:

enter image description here

Frame X+1:

enter image description here

0

There are 0 answers