███████ ██ ██████ ██ ██ ████████ ██████ ███ ███ ██████ ██ ████ ████████ ██████
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██ ███ ██ █████ ██ ███ ██ ██ █████ ██ ███ ██ ██████ ██ ██████ ██ ██████
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
███████ ██████ ██ ███ ███ ██ ██████ ██ ██ ██ ██████ ██ ██ ██ ██████
◎ A Base Project Setup for GLFW/OpenGL
C++ GUI/Graphics project template with GLFW, Dear ImGUI, and OpenGL 4.1.
Table of Contents
C++ GUI project template with SDL2, 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 | Windowing/Input | Cross-platform window and input management |
OpenGL | Graphics API | Hardware-accelerated rendering |
GLM | Math Library | OpenGL Mathematics (vectors, matrices, etc.) |
GLAD | OpenGL Loader | Generates OpenGL function loaders |
stb_image | Image Loading | Header-only image loading library |
Dear ImGui | GUI | Immediate Mode Graphical User Interface |
Assimp (optional) | Asset Import | Model/asset import library |
Tool | Purpose | Details |
---|---|---|
CMake | Build System | Cross-platform build configuration |
Make (optional) | Build Automation | Used on Linux/macOS for building |
Conan (optional) | Dependency Management | C++ package manager for libraries |
Compiler | Platforms | Minimum Version |
---|---|---|
Clang | Linux/Windows/macOS | 10+ |
MSVC | Windows | 2019+ |
GCC/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
Note:
All dependencies can be installed via your system package manager, or managed automatically using Conan.
See the Getting Started section for installation instructions.
- 💬 Join the Discussions: Share your insights, provide feedback, or ask questions.
- 🐛 Report Issues: Submit bugs found or log feature requests for the
GLFWTem
project. - 💡 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.
-
Project Templates:
- SDL Template – C++ template with SDL and ImGui
- SFML Template – C++ template with SFML and ImGui
- CppProject – General C++ project structure inspiration
- ModernCppStarter – Modern C++ project starter
-
Learning Resources:
This project is protected under the MIT License. For more details, refer to the LICENSE file.