On Sunday, 11 March 2012 at 03:45:36 UTC, Chad J wrote:
On 03/10/2012 10:29 PM, bioinfornatics wrote:
Le samedi 10 mars 2012 à 21:23 -0500, Chad J a écrit :
I've been looking for a good way to render font in OpenGL
with D.
Back in they day I was very impressed with Tomasz's article
on the
subject: http://h3.gd/dmedia/?n=Tutorials.TextRendering1
I was wonder if anyone has ported it.
take derelict2 http://www.dsource.org/projects/derelict
[stable]
derelict3 in development https://github.com/aldacron/Derelict3
I already have OpenGL working with derelict2.
How do these links help with rendering text in OpenGL?
I have some code based on that tutorial in
https://github.com/kiith-sa/ICE,
but beware that it's not the most effective code
and not particularly readable either.
However, I abstracted it away it to pack any textures instead of
just font glyphs, and it is spread over many files.
The relevant files are:
video/glvideodriver.d
video/texturepage.d
video/gltexturebackend.d
video/binarytexturepacker.d
video/font.d
video/fontmanager.d
Works with DMD 2.058, but it'd probably be nontrivial to rip it
out and use separately.