Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Probably the easiest would be to use a library like nanovg: https://github.com/memononen/nanovg
In general, I'm a big believer in immediate mode for 3D user interface elements. Before I worked at SketchUp, I did research into designing an immediate mode GUI library for VR applications. And many 3D applications use a similarly principled library called imgui for 2D graphics within their scenes.
In general, I'm a big believer in immediate mode for 3D user interface elements. Before I worked at SketchUp, I did research into designing an immediate mode GUI library for VR applications. And many 3D applications use a similarly principled library called imgui for 2D graphics within their scenes.
Of course, converting lines into triangle strips is really the simplest case. If you are writing a brand-new 3D editing program today, you will probably want to include more complexly shaped "little helpers" alongside your 3D objects. You can obviously use prerendered textures (signed-distance or otherwise) but if you are interested in wild new rasterization techniques, I'd also look into something like the pathfinder project. Pathfinder has been used by Mozilla to render PDFs in XR apps and even ships with an immediate mode helper object like I've described above.