Surma 4/24/2017

DOM2Texture: Abusing Arcane APIs

Read Original

This article details a creative hack to leverage the browser's built-in layout and font rendering engines for WebGL applications. It explains how to embed HTML within SVG using <foreignObject>, encode it as a data URL, and draw it to a canvas to create a texture, avoiding the need to manually implement text rendering and UI layout in OpenGL/WebGL.

DOM2Texture: Abusing Arcane APIs

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week