Jump to content

  • Log In with Google      Sign In   
  • Create Account


Performance with Lots of VBOs in WebGL


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 cadjunkie   Members   -  Reputation: 1039

Like
0Likes
Like

Posted 08 January 2014 - 02:53 PM

I've been working on trying to render trimmed NURBS in WebGL for a CAD project (not a game, I know). I've got all the help I need on the math side of this, but core of the method I'm working with makes me divide things up into monotone polygons. My approach is to triangulate the monotone polygons using the method in this PPT by Garey et. al., then throw that into my shader via VBOs and index buffers.

 

My real worry is that this could potentially generate 100s of small monotone polygons, which means 100s of VBOs and index buffers that I would have to link to a single surface object. The upside is that I'd only have to do this once per surface, so once it's done, it's up to the shaders to move things around.

 

I guess I'm just looking for potential gotchas with this as far as performance or maybe there's a better way to do things than the way I'm thinking. I've tried to find a way to offload the work to the shader, but I can't find a good way. Maybe there's a way to stitch the monotone polygons together...I'm not sure. I'm throwing this to the community for feedback.



Sponsor:

#2 RobTheBloke   Crossbones+   -  Reputation: 2228

Like
1Likes
Like

Posted 13 January 2014 - 12:44 PM

Normally you just insert all vertex data into a single vertex buffer, and set up all of the trip strips into a single index buffer (where the primitive restart index is used to define the start/end of a trip strip). 






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS