https://github.com/raydelto/opengl_sdf
Signed Distance Fields (SDF) Fonts Implementation in C++
https://github.com/raydelto/opengl_sdf
opengl signed-distance-fields
Last synced: 2 months ago
JSON representation
Signed Distance Fields (SDF) Fonts Implementation in C++
- Host: GitHub
- URL: https://github.com/raydelto/opengl_sdf
- Owner: raydelto
- Created: 2025-01-31T19:02:05.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-02-10T22:57:25.000Z (over 1 year ago)
- Last Synced: 2025-04-12T20:13:06.708Z (over 1 year ago)
- Topics: opengl, signed-distance-fields
- Language: C++
- Homepage:
- Size: 262 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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)`

## 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 .