{"id":20402512,"url":"https://github.com/jspanchu/vtkdearimguiinjector","last_synced_at":"2025-04-12T14:24:34.122Z","repository":{"id":64152465,"uuid":"371349911","full_name":"jspanchu/vtkDearImGUIInjector","owner":"jspanchu","description":"Inject DearImGUI into an existing VTK application. 💉","archived":false,"fork":false,"pushed_at":"2023-12-04T15:51:33.000Z","size":54866,"stargazers_count":25,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-12T14:24:30.080Z","etag":null,"topics":["cmake","cpp","dear-imgui","emscripten","gles3","imgui","sdl2","vtk","vtk-applications","vtk-library","wasm","webgl"],"latest_commit_sha":null,"homepage":"https://jspanchu.dev/vtkDearImGUIInjector/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jspanchu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-05-27T11:30:12.000Z","updated_at":"2025-03-24T16:15:21.000Z","dependencies_parsed_at":"2023-12-04T15:39:43.761Z","dependency_job_id":null,"html_url":"https://github.com/jspanchu/vtkDearImGUIInjector","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/jspanchu%2FvtkDearImGUIInjector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jspanchu%2FvtkDearImGUIInjector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jspanchu%2FvtkDearImGUIInjector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jspanchu%2FvtkDearImGUIInjector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jspanchu","download_url":"https://codeload.github.com/jspanchu/vtkDearImGUIInjector/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248579106,"owners_count":21127758,"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":["cmake","cpp","dear-imgui","emscripten","gles3","imgui","sdl2","vtk","vtk-applications","vtk-library","wasm","webgl"],"created_at":"2024-11-15T04:54:30.371Z","updated_at":"2025-04-12T14:24:34.100Z","avatar_url":"https://github.com/jspanchu.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vtkDearImGUIInjector\n[![Deploy WebAssembly binary](https://github.com/jspanchu/vtkDearImGUIInjector/actions/workflows/build-wasm.yml/badge.svg)](https://github.com/jspanchu/vtkDearImGUIInjector/actions/workflows/build-wasm.yml)\n\nInject [DearImGUI](https://github.com/ocornut/imgui) into an existing VTK application.\n\n![image](https://github.com/jspanchu/vtkDearImGUIInjector/assets/40538987/f2512679-d047-491f-a2c8-9cc7b38e8ca0)\n\n# Build\n\n## Desktop\n\nBuild the sample program by configuring the project with CMake. This step assumes you've built VTK. \n```bash\ncmake -GNinja -S . -B out -DVTK_DIR=/path/to/vtk/install/lib/cmake/vtk\ncmake --build out\n```\n\nNow you can run `./out/sample/main`.\n\n## WebAssembly (for browsers)\n\nCompile the C++ sources against a pre-built VTK wasm docker image using npm and itk-wasm-cli. This is the very same method\nused for the [live](https://jspanchu.dev/vtkDearImGUIInjector) web demo.\n\n```bash\nnpm run build-wasm\n```\n\n# Serve web page\n\n```bash\npython3 -m http.server -d build-emscripten/sample 8080\n# Open browser and visit http://localhost:8080\n```\n\n# Notes\nA very closely related project is phcerdan's https://github.com/phcerdan/vtkImGuiAdapter.\nThe two are slightly different in that:\n1. With vtkDearImGUIInjector, \n    \n    a. you do not have to take care of ImGUI contexts yourself.\n    \n    b. no need to write an event loop.\n2. With vtkImGUIAdapter,\n    \n    a. you are responsible for ensuring the sdl2 window is setup and the ImGUI context is initialized.\n    \n    b. you must write an event loop in your application, ensure events are processed and ensure NewFrame/EndFrame are called.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjspanchu%2Fvtkdearimguiinjector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjspanchu%2Fvtkdearimguiinjector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjspanchu%2Fvtkdearimguiinjector/lists"}