Skip to content

Signed Distance Fields (SDF) Fonts Implementation in C++

Notifications You must be signed in to change notification settings

raydelto/opengl_sdf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Signed Distance Fields (SDF) font Implementation in OpenGL

Simple Signed Distance Fields (SDF) font implementation written in C++ with OpenGL.

This projects provides a simple way of rendering text in OpenGL.

Sample usage:

RenderText(shader, "ABC abc", gWindowWidth / 2, gWindowHeight / 2, 1.0f, glm::vec3(1.0, 0.0, 0.0));

Where the function signature is:

RenderText(ShaderProgram *shader, std::string text, float x, float y, float scale, glm::vec3 color)

Font Test

Dependencies

  1. GLM (OpenGL Mathematics)
  2. GLFW3
  3. Freetype
  4. GLEW (For Linux & Windows Build) ; GLAD (for MacOS builds).

Build

We provide a simple Makefile that provides support for builindg the project in the following environments:

  1. Windows (MinGW)
  2. Linux
  3. MacOS

Should you have any question you can contact us at info@raycasters.com .

About

Signed Distance Fields (SDF) Fonts Implementation in C++

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published