Skip to content

branan/gltext

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gltext provides a text-rendering library compatible with modern (core profile) OpenGL implementations.

CMAKE NOTES:

gltext can be built as a standalone library, or integrated into your own CMake project as a subdirectory. If you use it as a subdirectory, the CMake variable GLTEXT_LIBRARIES will include gltext and its dependency libraries, and is intended to be used in your application's TARGET_LINK_LIBRARIES() command.

If built as a subdirectory, gltext will disable its 'make install' targets. If you would like gltext to be installed during 'make install' (for example, if your umbrella project is a bundle of libraries, not an appication), you can set the CMake variable GLTEXT_DO_INSTALL to ON.

OPENGL NOTES:

gltext makes some changes to the GL state as it renders. In most applications, these states will probably be overwritten by your code anyway. There may be issues if you generate a single VAO and treat it like the default VAO of older OpenGL versions. You should assume that after any gltext::Font function is called, including the constructor, that any and all of these states have changed to the following values:

  * VERTEX_ARRAY_BINDING is set to the VAO for the given font
  * CURRENT_PROGRAM is set to the shared text-drawing shader program
  * ACTIVE_TEXTURE is set to TEXTURE0
  * TEXTURE_BINDING_2D is set to the Font's cache texture
  * SAMPLER_BINDING is set to 0 for TEXTURE0 (OpenGL 3.3 and higher)
  * UNPACK_ALIGNMENT is set to 1
  * UNPACK_ROW_LENGTH is set to an arbitrary value

TODO:
  * Add some sort of line-splitting algorithm
  * Expose language and script settings from HarfBuzz

About

Library to render text using modern OpenGL techniques

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published