https://github.com/chirag-droid/opengl
This is my first OpenGl project.
https://github.com/chirag-droid/opengl
cmake cmakelists cpp glad glfw glfw3 graphics graphics-library graphics-programming opengl
Last synced: 7 months ago
JSON representation
This is my first OpenGl project.
- Host: GitHub
- URL: https://github.com/chirag-droid/opengl
- Owner: chirag-droid
- License: mit
- Created: 2021-09-18T19:14:20.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-09-29T11:26:52.000Z (about 4 years ago)
- Last Synced: 2025-01-26T12:08:39.250Z (9 months ago)
- Topics: cmake, cmakelists, cpp, glad, glfw, glfw3, graphics, graphics-library, graphics-programming, opengl
- Language: C++
- Homepage:
- Size: 41 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OpenGl
This is my first c++ project with OpenGl. Useful resources for learning OpenGl:
- [LearnOpengl.com book on opengl](https://learnopengl.com/book/book_pdf.pdf)
- freeCodeCamp.org's OpenGl course by [VictorGordan](https://github.com/VictorGordan) - https://www.youtube.com/watch?v=45MIykWJ-C4
- [TheCherno](https://youtube.com/c/TheChernoProject) OpenGl series on youtube - https://www.youtube.com/playlist?list=PLlrATfBNZ98foTJPJ_Ev03o2oq3-GGOS2
- [OpenGl docs](https://docs.gl)
- http://www.opengl-tutorial.org/## Compiling from source
- ### Downloading the repository
Start by cloning the repository with `git clone --recursive https://github.com chirag-droid/OpenGl`. This will download the repository and also download the submodules glfw and glad.If the repository was cloned non-recursively previously, use git submodule update --init to clone the necessary submodules.
- ### Toolchain
The project uses Cmake for build automation. Cmake generates files for other build system e.g. Ninja, make, nmake etc.I, use Ninja but you can use any build system you have.
> Note that a working python installation is also required to generate glad files.
- ### Compiling
First generate file for your build system using
`
cmake -S . -B build/ -G (ninja | )
`The S flag specifies the source directory, while B flag specifies the build directory. And the G flag specifies the generator to use
Next go to the newly generated build directory by using `cd build`. Now use the command for the generator you used. I used ninja so running `ninja` will make an executable file called `main.exe`.
If you encounter any error while doing so, feel free to open an issue