Jump to content
  • Advertisement
Sign in to follow this  
cadjunkie

Performance with Lots of VBOs in WebGL

This topic is 2103 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement

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). 

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!