{"id":22338103,"url":"https://github.com/jeffamstutz/match3d","last_synced_at":"2025-07-29T22:33:19.759Z","repository":{"id":55156561,"uuid":"389730815","full_name":"jeffamstutz/match3D","owner":"jeffamstutz","description":"A 3D viewer bootstrapping library","archived":false,"fork":false,"pushed_at":"2023-05-18T21:14:04.000Z","size":331,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2023-05-18T22:24:13.247Z","etag":null,"topics":["3d-graphics","cmake","cpp","glfw","gui","imgui"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jeffamstutz.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}},"created_at":"2021-07-26T18:24:05.000Z","updated_at":"2022-08-09T11:54:40.000Z","dependencies_parsed_at":"2023-01-30T04:45:51.817Z","dependency_job_id":null,"html_url":"https://github.com/jeffamstutz/match3D","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffamstutz%2Fmatch3D","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffamstutz%2Fmatch3D/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffamstutz%2Fmatch3D/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffamstutz%2Fmatch3D/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeffamstutz","download_url":"https://codeload.github.com/jeffamstutz/match3D/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228054430,"owners_count":17862129,"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":["3d-graphics","cmake","cpp","glfw","gui","imgui"],"created_at":"2024-12-04T06:13:11.309Z","updated_at":"2024-12-04T06:13:12.038Z","avatar_url":"https://github.com/jeffamstutz.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# match3D - a 3D viewer bootstrapping library\n\nThe match3D app prototyping library combines three ingredients: windowing\nlibrary ([GLFW](https://github.com/glfw/glfw)), UI library ([Dear\nImGui](https://github.com/ocornut/imgui)), and build system infrastructure\n(CMake) to all but eliminate the boilerplate involved in making simple 3D\napplications with a UI.\n\n### Requirements\n\n- CMake\n- C++11 compiler\n- GLFW\n\nmatch3D is developed and tested on Linux, but has nothing inherently platform\nspecific in it. If you try it on macOS or Windows and find a problem, let\nme know!\n\n# Building with match3D\n\nThe match3D library is consumed as a source library. This is easiest to do\nusing CMake via the provided package config. The provided example (found in\n[examples/simple](examples/simple)) is built like an external consumer of the\nlibrary.\n\nThe library is found by pointing your project's build to a local copy of the\n`match3D` source with either `match3D_DIR` variable or appending it to\n`CMAKE_PREFIX_PATH`. Then the consuming CMake is very straightforward and will\nlook something like:\n\n```cmake\nfind_package(match3D REQUIRED)\nadd_executable(myApplication)\ntarget_link_libraries(myApplication PRIVATE match3D::match3D)\n```\n\nLinking with the `match3D::match3D` target is all that is needed to bring in the\nnecessary includes and linked libraries to build your application, including\nGLFW and Dear Imgui. Note that `find_package(match3D)` will require GLFW to be\nfound in your environment in order to succeed in finding match3D itself.\n\nDownstream targets which link against `match3D::match3D` have everything\ndirectly built into it.\n\n### Using additional components\n\nmatch3D can optionally bring in additional header-only libraries: currently\n`stb_image` and `glm`. These are optionally added to the build by passing them\nto `find_package` as components. For example, the following will also fetch\n`glm` when constructing the match3D targets:\n\n```cmake\nfind_package(match3D REQUIRED COMPONENTS glm)\n```\n\nWhich then lets you include `glm` normally in your app:\n\n```cpp\n#include \u003cglm/glm.hpp\u003e\n```\n\n# Using the library to create an application\n\nThe match3D library revoles around a single C++ base class: `Application`.\nThis class has applications override methods to inject functionality for\ncreating the UI and drawing objects (with OpenGL) each frame. Specifically,\napplications must override:\n\n- `Application::setup()` -- this is invoked before the main UI loop is started\n- `Application::buildUI()` -- where all ImGui calls are made to create the UI\n- `Application::drawBackground()` -- where any drawing underneath the UI happens\n- `Application::teardown()` -- cleanup to occur before the destructor\n\nEach of the above methods are pure-virtual (`=0`) so that each customization\npoint is always visible in an implementation. The [provided\nexample](examples/simple/main.cpp) shows a minimal demonstration of an\napplication.\n\nNOTE: all mouse and keyboard I/O is to be done through Dear ImGui -- see example\napp to see it in action.\n\nWindow resize events are queried on each call to `buildUI()` via the protected\nmethod `bool Application::getWindowSize(int \u0026width, int \u0026height)`. The method\nalways writes the width/height as out parameters and returns `true` if the\nwindow has been resized since the last frame.\n\nFinally, applications must create a simple `main()` function to instantiate and\nrun the application. This may look something like:\n\n```c++\nint main()\n{\n  MyMatch3DApp app;\n  app.run(1280, 800, \"Example match3D application\");\n}\n```\n\nThe arguments provided to `Application::run()` are the initial window size and\ntitle bar text.\n\n# TODO\n\n- [ ] mulitple windowing library options (SDL2, GLUT, etc.)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeffamstutz%2Fmatch3d","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeffamstutz%2Fmatch3d","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeffamstutz%2Fmatch3d/lists"}