Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>OpenGL is simply not a good option for 2D text-heavy graphics. So I'm left with <canvas>, and <canvas> is slow.

That's what we call throwing the baby out with the bath water. What's wrong with using an orthographic frustrum?



I think the keyword is "text-heavy". Rendering 256 characters into a texture to use with WebGL is one thing, but what about unicode, or readability at small sizes? I'm honestly asking, I'd love to hear about ideas or libraries etc.


In OpenGL you can use CoreGraphics to render into a context and convert that data to a texture. This could be done for each string, but doing so you loose the power of the underlying implementation. If there are libraries that make this easier I am yet to come across them.

Wolfire have written a very good blog post about the issues with text rendering and OpenGL. http://blog.wolfire.com/2013/03/High-quality-text-rendering


Maybe he meant WebGL, but even then it could be done very well as with more modern OpenGL variants with bitmapped font tables. OpenGL on Mac is 3.2 IIRC. Nvidia recently tinkered with proprietary version of OpenVG with beautiful text rendering capabilities. There are numerous ways to make great text with OpenGL be performant with native code. Even GUIs with IMGUI approach. Some of those techniques could be done with WebGL, I'm sure. So, I don't really understand his point about text and OpenGL a no go Sure, WebGL is not all you can get with native and OpenGL, but nowhere near a fiasco in performance.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: