Lazarus

Programming => LCL => Topic started by: alexander on January 20, 2017, 05:20:13 pm

Title: Text/Character rendering in opengl without glut
Post by: alexander on January 20, 2017, 05:20:13 pm
The tutorial http://wiki.lazarus.freepascal.org/OpenGL_Tutorial#Bitmap_fonts  explains how to render text in opengl using glut. However I would like to use openglcontext and not glut. Is there another easy way to render text?
Title: Re: Text/Character rendering in opengl without glut
Post by: piola on September 27, 2021, 12:21:51 am
Trying to push this up, maybe there's some answer meanwhile.

I'm also interested in a solution; the strange thing is that the tutorial discourages using Glut first, but then uses it for rendering text...  :-\
Title: Re: Text/Character rendering in opengl without glut
Post by: wp on September 27, 2021, 12:29:16 am
In TAChart we use the LazFreeType routines for painting text in OpenGL: unit TAOpenGL contains the basic class, TGLFreeTypeHelper, and is pretty much self-contained. It requires TAFonts which is self-contained, too. Application of TGLFreeTypeHelper can be seen in unit TAOpenGLDrawer. You find all these units in folder components/tachart of your Lazarus installation.
Title: Re: Text/Character rendering in opengl without glut
Post by: marcov on September 27, 2021, 09:23:09 am
Search for "signed distance fonts" on this forum
Title: Re: Text/Character rendering in opengl without glut
Post by: piola on September 29, 2021, 10:39:45 am
Great! Thanks  :)
TinyPortal © 2005-2018