Test application for rendering text with FreeType2 to an OpenGL texture.
- In FreeType:
- Open font file
- Get glyph
- Create a bitmap
- In OpenGL
- Create a texture
- Load the bitmap into texture
- Render the texture
This app has 4 external dependencies:
- CMake to build the project,
- pkg-config to locate shared libraries,
- freetype to read and write video files.
On MacOS using Homebrew, run:
brew install cmake pkg-config
git clone https://github.com/bartjoyce/gl-freetype --recursive
The repository includes a submodule for GLFW, so make sure to recursively clone the repo. If CMake complains and says it can't find GLFW, it might be because you did not clone it properly. In that case, try:
git submodule update --init
Inside the repo, create a build directory and run CMake within it:
mkdir build
cd build
cmake ..
make
./gl-freetype