Recent

Author Topic: Text/Character rendering in opengl without glut  (Read 4337 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

  • Full Member
  • ***
  • Posts: 124
  • Lazarus 2.2, 64bit on Windows 8.1 x64
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: 11912
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.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11446
  • 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

  • Full Member
  • ***
  • Posts: 124
  • Lazarus 2.2, 64bit on Windows 8.1 x64
Re: Text/Character rendering in opengl without glut
« Reply #4 on: September 29, 2021, 10:39:45 am »
Great! Thanks  :)

 

TinyPortal © 2005-2018