Recent

Author Topic: Text/Character rendering in opengl without glut  (Read 3441 times)

alexander

  • New member
  • *
  • Posts: 8
    • My Homepage
Text/Character rendering in opengl without glut
« 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?

piola

  • Jr. Member
  • **
  • Posts: 74
Re: Text/Character rendering in opengl without glut
« Reply #1 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...  :-\

wp

  • Hero Member
  • *****
  • Posts: 8894
Re: Text/Character rendering in opengl without glut
« Reply #2 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.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 9589
  • FPC developer.
Re: Text/Character rendering in opengl without glut
« Reply #3 on: September 27, 2021, 09:23:09 am »
Search for "signed distance fonts" on this forum

piola

  • Jr. Member
  • **
  • Posts: 74
Re: Text/Character rendering in opengl without glut
« Reply #4 on: September 29, 2021, 10:39:45 am »
Great! Thanks  :)

 

TinyPortal © 2005-2018