{"id":18837434,"url":"https://github.com/lightnet/cmakesdl2cimgui","last_synced_at":"2026-01-28T02:30:18.326Z","repository":{"id":142372784,"uuid":"358329686","full_name":"Lightnet/cmakesdl2cimgui","owner":"Lightnet","description":"The prototype build that is written in c for cimgui (branch off imgui) with sdl2 window and gl3w opengl3. Just simple empty project to test.","archived":false,"fork":false,"pushed_at":"2021-04-17T01:51:14.000Z","size":246,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-30T08:41:58.132Z","etag":null,"topics":["c","cimgui","cmake","cmakelists","gl3w","glad1","glad2","glew","imgui","sdl2"],"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/Lightnet.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":"2021-04-15T16:48:13.000Z","updated_at":"2021-04-17T01:51:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"c918e851-cddd-492d-a6a3-4ce9e53fe769","html_url":"https://github.com/Lightnet/cmakesdl2cimgui","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lightnet%2Fcmakesdl2cimgui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lightnet%2Fcmakesdl2cimgui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lightnet%2Fcmakesdl2cimgui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lightnet%2Fcmakesdl2cimgui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Lightnet","download_url":"https://codeload.github.com/Lightnet/cmakesdl2cimgui/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239774324,"owners_count":19694700,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["c","cimgui","cmake","cmakelists","gl3w","glad1","glad2","glew","imgui","sdl2"],"created_at":"2024-11-08T02:35:11.145Z","updated_at":"2026-01-28T02:30:18.294Z","avatar_url":"https://github.com/Lightnet.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cmakesdl2cimgui\n\n# Packages:\n * SDL 2.0.14 (github)\n * freetype 2.10.4 (github)\n * SDL tff 2.0.15 (github)\n * CMake 3.20.1 (download and install)\n * VS 2019 (current build tested) (download)\n * cimgui 1.82 https://github.com/cimgui/cimgui\n * Gl3w https://github.com/skaslev/gl3w\n * Python (need for gl3w to build files include and src)\n * glad 0.1.34 https://github.com/Dav1dde/glad\n * glad 2.0\n * glew 2.20 https://github.com/nigels-com/glew\n\n# Information:\n  This was tested in window 10 64 bit build. This for imgui that is coded in c lanuage test build with cmake. It is branch off from https://github.com/ocornut/imgui to https://github.com/cimgui/cimgui that worked on to 1.82 version.\n\n# Build:\n  Install CMake and chose of build tool compiler. Note that opengl required other packages depend on the operating system.\n\n  The next part is tricky. Is to chose which opengl package to used. GL3W, GLEW, GLAD and GLAD2.\n\n```cmake\n#CMakeLists.txt\nadd_definitions(-DIMGUI_IMPL_OPENGL_LOADER_GL3W=0) # imgui_impl_opengl3.h # imgui Default to GL3W embedded in our repository\n#add_definitions(-DIMGUI_IMPL_OPENGL_LOADER_GLEW=0)\n#add_definitions(-DIMGUI_IMPL_OPENGL_LOADER_GLAD=0)\n#add_definitions(-DIMGUI_IMPL_OPENGL_LOADER_GLAD2=0)\n```\n  You need to comment them out but one must be uncomment to used opengl.\n```cmake\n#CMakeLists.txt\nset(ENABLE_GL3W ON) # works #default from imgui\nset(ENABLE_GLEW OFF) # work\nset(ENABLE_GLAD OFF) # work\nset(ENABLE_GLAD2 OFF) # work\n```\n  As well for this settings.\n\n  Once that is done. But note that gl3w to build files with python 3.9.4.\n\n  Command Line:\n```\nmkdir build\ncd build\ncmake ..\ncmake --build .\n```\n  Please note that currently set to window and it not config for other platform.\n\n# Note: \n * The CMakeList.txt will download the SDL 2.0 files from github and other add ons for easy to access. As well auto build the dlls, include, src and other setting on CMakeLists.txt.\n * If on window and with firewall or security that will block compile build commands.\n\n```cmake\n\nif (NOT freetype_FOUND)\n...\nadd_library(Freetype::Freetype ALIAS freetype)\n...\nendif()\n\nadd_library(SDL2::SDL2 ALIAS SDL2) # required to set for window\nadd_library(SDL2::SDL2-static ALIAS SDL2-static)\n\n```\n\n# Dev Notes:\n```\nDownload first time. Then set not to recheck when connect to internet or recompile. This will speed things up.\n\n# https://bewagner.net/programming/2020/05/02/cmake-fetchcontent/\n#set(FETCHCONTENT_FULLY_DISCONNECTED ON) # When this option is enabled, no attempt is made to download or update any content.\nset(FETCHCONTENT_UPDATES_DISCONNECTED ON) # Skip Update\n```\n\n```c\n//some code will error on main\n#include \u003cSDL.h\u003e\n#define main SDL_main\n#undef main\n```\n## c in vulkan:\n  Not much src or example files for c language setup. There are few but it take time to look at how it works. From vulkan, sdl and other yet look into yet. There one example file each but it a lot in one file.\n\n# Credits:\n  * Help of font loading.\n    * https://github.com/grimfang4/SDL_FontCache\n  * Help of library loading with SDL2::SDL2.lib\n    * https://github.com/cpm-cmake/CPM.cmake/issues/144\n  * Help with direction of SDL2 build.\n    * https://github.com/cimgui/cimgui\n  * Trouble shoot compile.\n    * https://github.com/ocornut/imgui\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightnet%2Fcmakesdl2cimgui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flightnet%2Fcmakesdl2cimgui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightnet%2Fcmakesdl2cimgui/lists"}