Skip to content

Tests to get an text rendering using modern OpenGL and using sf::Font as the font handler

Notifications You must be signed in to change notification settings

Hopson97/opengl-text

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenGL Text Testing

Testing to see if I can get opengl text rendering using sfml as a font loader.

Progress (Album)

Text loaded to a texture:

Text loaded to a texture:

Commit


Text rendered as a single vertex array, one character per quad.

Text rendered to a quad

Commit


Text as row of text, except the image texture seems to be upsidedown flipped.

Upside down text row

Commit


Finally worked out texture coords except a lot of characters were positioned incorrectly

All Letters

Punctuation especially:

Punctuation

So added a bunch of hacky edge cases :/

Kinda works but idk prob is a better way:

Final

Building and Running

Libraries

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

Linux

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

About

Tests to get an text rendering using modern OpenGL and using sf::Font as the font handler

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published