This is the first of two videos on font and text rendering in OpenGL using the FreetypeGL library. In this video we learn how to build FreetypeGL and its dependencies on Windows. In the next one we will integrate it into an OpenGL application.
Here's a short summary of the steps presented in the video:
1. Install CMake.
2. Create ‘work’ directory
3. Create ‘work\lib’
4. Download Freetype from https://download.savannah.gnu.org/rel... and extract it in 'work'.
5. Open solution from freetype\builds\windows\vc2010
6. Change to ‘Release’ build and build solution.
7. Copy freetype\objs\x64\Release\freetype.lib/dll to work\lib
8. Clone https://github.com/rougier/freetype-g...
9. Open freetype-gl\VisualC\freetype-gl.sln (using Visual Studio).
10. If asked, upgrade solution.
11. Change to ‘Release’ build
12. Add to C/C++ - General - Additional include directories:
C:\Users\emeir\Documents\work\freetype-2.13.0\include
ogldev\Include
13. Copy freetype-gl\VisualC\bin\Release_x64\freetype-gl.lib to work\Lib
14. Copy "C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\um\x64\OpenGL32.Lib" to work\lib.
Create Freetype-GL demos
1. Download GLFW source package from https://github.com/glfw/glfw/releases...
2. Unzip the package, open terminal in the extract directory and execute:
cmake -G "Visual Studio 17 2022" -DCMAKE_BUILD_TYPE=Release -S . -B build
3. Open build/GLFW.sln and build in release build.
4. Execute in terminal:
cmake --install build --prefix install
5. cd freetype-gl/demo
6. Add to CMakeLists.txt:
list(APPEND CMAKE_PREFIX_PATH "../../glfw-3.3.8/install")
7. Open freetype-gl/demos/Project.sln
8. Add to demo-utils project include:
C:\Users\emeir\Documents\work\freetype-gl
ogldev\include
9. Remove include config.h from opengl.h
Add link directory to Ansi project: ..\..\Lib
Add "C:\Users\emeir\Documents\ogldev2\Windows\Lib\glew32.lib"
Timecodes:
0:00 Intro
1:45 Download Freetype
2:34 Building Freetype
3:43 Clone FreetypeGL sources
4:01 Build FreetypeGL
8:28 FreetypeGL demos
8:40 Download GLFW
9:21 Build GLFW
10:14 Build FreetypeGL demos
14:30 Running the demos
15:19 Outro
Make sure to watch all the previous tutorials in the "OpenGL For Beginners" playlist at • OpenGL for Beginners
Please visit https://ogldev.org to see more of my tutorials on modern OpenGL.
Link to source: https://github.com/emeiri/ogldev/blob...
OpenGL 4.6 specification: https://www.khronos.org/registry/Open...
Feel free to comment below.
Email: [email protected]
Instagram: @ogldev1
Github: https://github.com/emeiri/ogldev.git
Twitter: @ogldev
One time donations (Paypal): https://ogldev.org/donate.html
Patreon: / ogldev
Music credits:
Track: Moonlight — Next Route [Audio Library Release] Music provided by Audio Library Plus Watch: • Moonlight — Next Route |
Free Backgro... Free Download / Stream: https://alplus.io/moonlight
––––––––––––––––––––––––––––––
I Go Beyond The Day by Pyrosion / pyrosion Creative Commons — Attribution 3.0 Unported — CC BY 3.0 Free Download / Stream: https://bit.ly/3se4Ro2 Music promoted by Audio Library https://bit.ly/462GoRn
––––––––––––––––––––––––––––––
Twinkle by Roa / roa_music1031 Creative Commons — Attribution 3.0 Unported — CC BY 3.0 Free Download / Stream: https://bit.ly/3s7pKkG Music promoted by Audio Library https://bit.ly/485no6G
––––––––––––––––––––––––––––––
Bali Nature by TVARI / tvarimusic Creative Commons — Attribution-ShareAlike 3.0 Unported CC BY-SA 3.0 Free Download / Stream: https://bit.ly/3DFDgP2 Music promoted by Audio Library https://bit.ly/3EpQmQL
––––––––––––––––––––––––––––––
Evening by Qlowdy / qlowdymusic Creative Commons — Attribution 3.0 Unported — CC BY 3.0 Free Download / Stream: https://bit.ly/3NNExs1 Music promoted by Audio Library https://bit.ly/3ErUKPf
––––––––––––––––––––––––––––––
Track: Ocean Tide — Jay Someday [Audio Library Release] Music provided by Audio Library Plus Watch: • Ocean Tide — Jay Someday |
Free Backg... Free Download / Stream: https://alplus.io/ocean-tide
Enjoy,
Etay Meiri
#opengl #ogldev #opengtutorials