███████ ██ ██████ ██ ██ ████████ ██████ ███ ███ ██████ ██ ████ ████████ ██████
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██ ███ ██ █████ ██ ███ ██ ██ █████ ██ ███ ██ ██████ ██ ██████ ██ ██████
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
███████ ██████ ██ ███ ███ ██ ██████ ██ ██ ██ ██████ ██ ██ ██ ██████
◎ A Base Project Setup for GLFW/OpenGL
C++ Rendering/Graphics project template with GLFW, Dear ImGUI, and OpenGL 4.1.
Table of Contents
This repository template should allow for a fast and hassle-free kick start of your next GLFW project using CMake. Thanks to GitHub's nature of templates, you can fork this repository without inheriting its Git history.
The template starts out very basic, but might receive additional features over time:
- Basic CMake script to build your project and link GLFW on any operating system
- Basic GitHub Actions script for all major platforms
C++ GLFW project template with GLFW, Dear ImGUI, and OpenGL 4.1. This repository is a template OpenGL project configured using CMake. It supports cross-platform builds, and provides a good starting point to begin OpenGL development.
- Prototyping
- Getting started with game programming
- Getting started with graphics programming
- Modular project structure: sources, headers, and entry points are organized in distinct folders for clarity and scalability.
- Modern CMake build system for easy, cross-platform compilation and dependency management.
- Out-of-the-box support for GLFW, OpenGL 4.1, GLM, GLAD, Dear ImGui, and stb_image.
- Continuous integration via GitHub Actions for automated builds and testing.
- Example code for window creation, rendering loop, and GUI integration.
- Easily extensible for additional libraries or custom modules.
- Cross-platform: Windows, Linux, and macOS support.
- Optional support for Conan for advanced dependency management.
- Ready-to-use template for rapid prototyping, game development, or graphics research.
This project leverages several modern libraries and tools to streamline development, building, and documentation.
| Library | Purpose | Details |
|---|---|---|
| GLFW | Window/Input | Cross-platform window and input management |
| OpenGL | Graphics API | Hardware-accelerated rendering |
| ImGui | Graphical User Interface | Immediate Mode Graphical User Interface |
| GLM | OpenGL Math Library | OpenGL Mathematics (vectors, matrices, etc.) |
| Glad | OpenGL Loader | OpenGL function loaders |
| Stb Image | Image Loading | Header-only image loading library |
| Compiler | Platforms | Minimum Version |
|---|---|---|
| Clang | Linux/Windows/MacOs | 10 |
| MSVC | Windows Only | 2019 |
| GNU/MinGW | Linux/Windows/MacOs | 9 |
- Git – Version control and submodule/dependency management
- Doxygen – (Optional) Generate code documentation
- Ninja – (Optional) Faster alternative build backend for CMake
- Conan for install packages (optional)
Using CMake
Configuring and Building
Using Make
Configuring and Building
- 💬 Join the Discussions: Share your insights, provide feedback, or ask questions.
- 🐛 Report Issues: Submit bugs found or log feature requests for the
GLFWTemproject. - 💡 Submit Pull Requests: Review open PRs, and submit your own PRs.
Contributing Guidelines
- Fork the Repository: Start by forking the project repository to your github account.
- Clone Locally: Clone the forked repository to your local machine using a git client.
git clone --recursive https://github.com/djoezeke/GLFWTem
- Create a New Branch: Always work on a new branch, giving it a descriptive name.
git checkout -b new-feature-x
- Make Your Changes: Develop and test your changes locally.
- Commit Your Changes: Commit with a clear message describing your updates.
git commit -m 'Implemented new feature x.' - Push to github: Push the changes to your forked repository.
git push origin new-feature-x
- Submit a Pull Request: Create a PR against the original project repository. Clearly describe the changes and their motivations.
- Review: Once your PR is reviewed and approved, it will be merged into the main branch. Congratulations on your contribution!
We would like to express our gratitude to the following projects and individuals whose work made this project possible:
- GLFW – for providing a robust, cross-platform OpenGL framework.
- OpenGL – for the graphics API.
- Dear ImGui – for the immediate mode GUI library (if used).
- The open-source community for their invaluable libraries, tutorials, and support.
- Special thanks to all contributors, testers, and users who provided feedback and suggestions.
If you feel your work should be acknowledged here, please open an issue or pull request.
- SFMLTem : A SFML Starter Template with SFML and ImGui.
- SDLTem : A SDL Starter Template with SDL and ImGui.
- CppStarter : A C/C++ Starter Template.
- Official CMake Tutorial
- Dear ImGui with Conan
- Dear ImGui with Vulkan
- GLFW Documentation
- OpenGL Tutorials
- GLM Manual
This project is protected under the MIT License. For more details, refer to the LICENSE file.