{"id":18058177,"url":"https://github.com/belimfaux/opengl_template","last_synced_at":"2026-04-28T08:03:50.938Z","repository":{"id":258382249,"uuid":"873828854","full_name":"BelimFaux/opengl_template","owner":"BelimFaux","description":"Starting point for building projects with OpenGL, GLFW, GLAD and GLM.","archived":false,"fork":false,"pushed_at":"2025-04-12T22:45:32.000Z","size":5688,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T23:27:27.119Z","etag":null,"topics":["cpp","glad","glfw","glm","glsl-shaders","opengl","template","template-project"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BelimFaux.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-16T19:39:23.000Z","updated_at":"2025-04-12T22:45:36.000Z","dependencies_parsed_at":"2024-10-19T03:22:14.447Z","dependency_job_id":null,"html_url":"https://github.com/BelimFaux/opengl_template","commit_stats":null,"previous_names":["belimfaux/opengl_template"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/BelimFaux/opengl_template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BelimFaux%2Fopengl_template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BelimFaux%2Fopengl_template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BelimFaux%2Fopengl_template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BelimFaux%2Fopengl_template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BelimFaux","download_url":"https://codeload.github.com/BelimFaux/opengl_template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BelimFaux%2Fopengl_template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32371675,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"online","status_checked_at":"2026-04-28T02:00:07.250Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","glad","glfw","glm","glsl-shaders","opengl","template","template-project"],"created_at":"2024-10-31T03:05:27.513Z","updated_at":"2026-04-28T08:03:50.918Z","avatar_url":"https://github.com/BelimFaux.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenGL Template\n\nThis repo is meant as a starting point for building simple OpenGL project with glfw/glad. The glfw and glm repos are added as submodules in the repo and subdirectories in the CMake file.\nThis way they always stay up to date and are compiled statically into the program.  \nThe glad files are not added as submodules since they are generated by the [Glad Webgenerator](https://glad.dav1d.de). If you want to use a different version just download from the Generator Website and replace the glad/src and glad/include directories. Don't override the CMake file.  \nThe libraries that come with this repo are the same ones used by Victor Gordan's [OpenGL Tutorial Series](https://www.youtube.com/playlist?list=PLPaoO-vpZnumdcb4tZc4x5Q-v7CkrQ6M-) so its perfectly suited for following along, without having configuration problems.\nThe Example Project is taken from the [gflw Website](https://www.glfw.org/docs/latest/quick.html) and was just modified a little bit to use glm and import shader files.\n\n# Downloading and Building\n\nTo build and use this Project, first clone the repo and its submodules and the run cmake.\n\n```bash\ngit clone --recurse-submodules https://github.com/BelimFaux/opengl_template.git\ncd opengl_template\ncmake -B build .\ncmake --build build -- all\n./build/opengl_template\n```\n\nIf youre IDE doesn't automatically recognize the include directory, a `compile_commands.json` file can be generated from the CMake file.\n\n```bash\ncmake -DCMAKE_BUILD_TYPE=debug -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -B build .\n```\n\n# Configuring\n\n## Files\n\nAll files in the src/ directory get added as source files. Corresponding headers can be stored in the include/ directory.\nA `.clang-format` file is provided. You can of course format youre code however you want.\n\n## Resources\n\nResources like shaders, images, models etc. that will be imported in the Program can be placed in additional directories, like the shaders/ directory in the example project.\nTo ensure all paths in the program to these resources are always valid I would recommend setting the path as a compile definition in the CMake file. This way all paths stay absolute and change automatically when you move the project directory.\n\n## CMake\n\nTo change the project name or version, adjust the corresponding Variables in the CMakeLists.txt file.\n\n```cmake\nproject(\u003cyour_name\u003e VERSION \u003cyour_version\u003e)\n```\n\nWhen adding new external libraries, you have to make sure you link them to youre project.\n\n```cmake\nadd_subdirectory(${EXTERNAL_DIR}/\u003cyourlib\u003e)\ntarget_link_libraries(${PROJECT_NAME} PRIVATE \u003cyourlib\u003e)\n```\n\nExternal headers can just be placed in the external directory without modification of the CMake file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbelimfaux%2Fopengl_template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbelimfaux%2Fopengl_template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbelimfaux%2Fopengl_template/lists"}