Testing to see if I can get opengl text rendering using sfml as a font loader.
Progress (Album)
Text loaded to a texture:
Text rendered as a single vertex array, one character per quad.
Text as row of text, except the image texture seems to be upsidedown flipped.
Finally worked out texture coords except a lot of characters were positioned incorrectly
Punctuation especially:
So added a bunch of hacky edge cases :/
Kinda works but idk prob is a better way:
SFML and GLM are required.
These can be installed from your project manager. For example, on Debian/ Ubuntu:
sudo apt install libsfml-dev libglm-dev
If this is not possible (eg windows), you can install these manually from their respective websites:
https://www.sfml-dev.org/download.php
https://github.com/g-truc/glm/tags
To build, at the root of the project:
sh scripts/build.sh
To run, at the root of the project:
sh scripts/run.sh
To build and run in release mode, simply add the release
suffix:
sh scripts/build.sh release
sh scripts/run.sh release
You can also create a deployable build (that can be sent) by doing:
sh scripts/deploy.sh