'WebGL What's the best way to render SVG vectors
I am building a procedurally generated and interactive map using WebGL. The terrain looks good: you can zoom and move around but now I would like to add assets to decorate like mountains or trees. I have several SVGs that I would like to incorporate. So I would like to create a buffer for each asset (I think there will be about ten different mountains), and call my shader to have a buffer and a particular coordinate for each mountain I want to draw. I use Twgl, a very small lib to speed up the use of WebGL, but nothing very complete: I am rather low level (in particular I do not use three.js). What would you advise me to load these SVGs? Are there any libs to convert SVG to triangles that I can give directly to the graphics card? Keeping the colors?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
