A simple Bezier Curve example made in OpenGL using glad, freetype, glfw and premake5.
This project is made to be a quick lookup reference for how Bezier Curves work, and as a tutorial for beginners on how to implement them yourself in a low level graphics API like OpenGL (I chose OpenGL because it is the simplest)
All the Bezier Curve calculations are done in main.cpp via the formula (see https://en.wikipedia.org/wiki/B%C3%A9zier_curve).
The other code is to show how to implement it and it's by no means good code because I had to keep it simple
Don't forget to star the repository if it helped you :)
The project is built using Premake5 (see https://github.com/premake/premake-core). I only tested it on windows (tested on MSVC2017), however I don't think the libraries will work on Linux or MacOS.
So if you are using linux or MacOS you are going to have to link the libraries manually.
Steps on building in windows:
- Open commandline window on project directory.
- Type "premake5 vsYOUR_VISUAL_STUDIO_VERSION", so for me it was "premake5 vs2017".
- Open the newly generated Buid directory and open Simple-Bezier-Curve-OpenGL.sln.
- Build and run the executable in VisualStudio