View Full Version : HTML elements in WebGL 3D context?

11-14-2010, 02:26 AM
I want to render a HTML snippet, say, a single paragraph of formatted text or an entire webpage, as part of a 3D scene using WebGL. The idea is to have the HTML snippet rendered into a texture and then map that texture to any surface (or simply a quad).

Is there any way to do this in WebGL? Is it part of the standard? Do some browsers support this as a proprietary extension?


11-16-2010, 09:33 AM
AFAIK you could use canvas.toDataUrl which returns image element. And then try to set canvas position and dimension in the way that it covers needed html elements.
(I'm not sure if it'll work)