Drawing strings in OpenGL

What is the fastest and easiest way to draw text in standard OGL?

+3
source share
6 answers

Text unexpectedly engages in OpenGl
Take a look at this example from NeHe

+4
source

OpenGL does not support drawing text. You need to use some library to render text into a bitmap, and then you can use OpenGL to render the bitmap. Freetype2 and Pango are good low-level cross-platform solutions. Game programming libraries, such as the ClanLib and GUI libraries, such as Qt, may also have their own ways to render text.

+1

, , , . , SDL , , lib SDL: http://gameprogrammingtutorials.blogspot.com/2010/02/sdl-tutorial-series-part-6-displaying.html

, : glutStrokeString, glutBitmapString .

0

. , .

, , , ...

API OpenGL, (.. wglUseFontOutlines), , OpenGL 3.2.

0

OpenGL . :

  • , WGL AGL, ( Open GL).
  • GLUT ( ) ( ).
  • , FreeType ( , - Pango ).
  • quads ( , Quake 1 ).
0

, . , .

-1

Source: https://habr.com/ru/post/1734698/


All Articles