Display SVG on 3D planes using openGL

989 Views Asked by At

I have a requirement to draw different SVG files on respective 3D planes. For example, if I have two SVG files, I want to render them on two different 3D planes in openGL so that the planes can then have independent orientations in space. I tried using openVG for this purpose, but as I see, it only allows to use 2D transformations.

Is there a way to do this in openVG or some other openGL based approach?

2

There are 2 best solutions below

0
genpfault On

Render SVG to texture, draw textured quad in desired orientation.

1
Unknown1987 On

I would take the approach of rendering SVG to a texture, then map that texture to the 3d planes that you oriented in openGL.

Alternatively, you can wrap the root SVG visual with a perspective transform that does the equivalent 3D transform you want applied to each plane.