{"id":13731658,"url":"https://github.com/yuki-koyama/bigger","last_synced_at":"2025-04-10T05:05:46.526Z","repository":{"id":41254480,"uuid":"178098010","full_name":"yuki-koyama/bigger","owner":"yuki-koyama","description":"bigg (bgfx + imgui + glfw + glm) + utils","archived":false,"fork":false,"pushed_at":"2023-03-20T11:13:24.000Z","size":3254,"stargazers_count":233,"open_issues_count":7,"forks_count":23,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-24T07:58:11.620Z","etag":null,"topics":["bgfx","glfw","glm","imgui","utils"],"latest_commit_sha":null,"homepage":null,"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/yuki-koyama.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,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-03-28T00:51:13.000Z","updated_at":"2025-03-03T11:21:00.000Z","dependencies_parsed_at":"2024-01-31T02:09:35.121Z","dependency_job_id":"71d86fd0-3bf5-4f9f-abc8-b207a04e7245","html_url":"https://github.com/yuki-koyama/bigger","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/yuki-koyama%2Fbigger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuki-koyama%2Fbigger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuki-koyama%2Fbigger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuki-koyama%2Fbigger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yuki-koyama","download_url":"https://codeload.github.com/yuki-koyama/bigger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246916761,"owners_count":20854514,"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":["bgfx","glfw","glm","imgui","utils"],"created_at":"2024-08-03T02:01:35.052Z","updated_at":"2025-04-03T01:11:48.020Z","avatar_url":"https://github.com/yuki-koyama.png","language":"C++","funding_links":[],"categories":["Graphics"],"sub_categories":[],"readme":"# bigger\n\n![macOS](https://github.com/yuki-koyama/bigger/workflows/macOS/badge.svg)\n![Ubuntu](https://github.com/yuki-koyama/bigger/workflows/Ubuntu/badge.svg)\n[![GitHub license](https://img.shields.io/github/license/yuki-koyama/bigger)](https://github.com/yuki-koyama/bigger/blob/master/LICENSE)\n\nbigg (bgfx + imgui + glfw + glm) + utils\n\nThis library, named `bigger`, is a prototype-oriented middleware library for 3D interactive applications. Based on a library named `bigg`, which stands for `bgfx` + `imgui` + `glfw` + `glm`, this library adds some higher-level utilities (such as renderable primitive classes) to make the prototyping of lightweight and cross-platform apps even easier.\n\n![](./docs/screen_shot.png)\n\n## Languages\n\n- C++17\n- GLSL 1.30\n\n## Dependencies\n\n- bigg \u003chttps://github.com/Josh4428/bigg\u003e [Unlicense]\n  - bgfx.cmake \u003chttps://github.com/widberg/bgfx.cmake\u003e [CC0 1.0 Universal]\n    - bgfx \u003chttps://github.com/bkaradzic/bgfx\u003e [BSD 2-Clause]\n    - bimg \u003chttps://github.com/bkaradzic/bimg\u003e [BSD 2-Clause]\n    - bx \u003chttps://github.com/bkaradzic/bx\u003e [BSD 2-Clause]\n  - Dear ImGui \u003chttps://github.com/ocornut/imgui\u003e [MIT]\n  - GLFW \u003chttps://github.com/glfw/glfw\u003e [Zlib]\n  - GLM \u003chttps://github.com/g-truc/glm\u003e [MIT]\n- random-util \u003chttps://github.com/yuki-koyama/rand-util\u003e [MIT]\n- string-util \u003chttps://github.com/yuki-koyama/string-util\u003e [MIT]\n- tinyobjloader \u003chttps://github.com/tinyobjloader/tinyobjloader/\u003e [MIT]\n\n## Main Classes\n\n- App __(needs to be overridden)__\n- Camera\n- Primitives\n  - Cube primitive\n  - Dynamic mesh primitive\n  - Mesh primitive\n  - Plane primitive\n  - Sphere primitive\n- Materials\n  - Blinn-Phong material\n  - MatCap material\n\n## App Event Cycle\n\n- `bigger::App::runApp()`\n  - `bigg::Application::run()`\n    - `glfw` initialization\n    - `bgfx` initialization\n    - `imgui` initialization\n    - Reset\n    - `bigger::App::initialize()` __(needs to be overridden)__\n    - Main loop\n      - `glfw` event polling\n      - `imgui` event polling\n      - `bigger::App::update()`\n        - `bigger::App::updateApp()` __(needs to be overridden)__\n        - Update scene objects (`bigger::SceneObject::update()`)\n        - Render scene objects (`bigger::SceneObject::draw()`)\n      - `imgui` render\n      - `bgfx` submit\n    - `bigger::App::shutdown()`\n      - Release scene objects\n      - `bigger::App::releaseSharedResources()` __(needs to be overridden)__\n    - `imgui` shutdown\n    - `bgfx` shutdown\n    - `glfw` shutdown\n\n## App Design\n\n- Always two directional lights\n  - Other types of lights or more than two directional lights are not supported\n- Intensive use of smart pointers\n  - Primitives and materials need to be dynamically instantiated and managed by smart pointers (i.e., either `std::shared_ptr\u003cT\u003e` or `std::unique_ptr\u003cT\u003e`)\n\n## Usage\n\n### Minimal Example\n\nThis is a minimal example of using `bigger::App`. This app just shows a blank window and do nothing.\n\n```cpp\n#include \u003cbigger/app.hpp\u003e\n\nclass MinimalApp final : public bigger::App\n{\npublic:\n\n    MinimalApp() {}\n\n    void initialize(int argc, char** argv) override {}\n    void updateApp() override {}\n    void releaseSharedResources() override {}\n};\n\nint main(int argc, char** argv)\n{\n    MinimalApp app;\n    return app.runApp(argc, argv);\n}\n```\n\n### Override App Class\n\nThe following three methods need to be overridden by the new app class:\n\n- `bigger::App::initialize()`: Initializing the app and instantiating necessary objects living through the app life.\n- `bigger::App::updateApp()`: Writing frame-wise update rules and calling `imgui` draw calls.\n- `bigger::App::releaseSharedResources()`: Releasing shared resources maintained by the app class (such as vertex buffers).\n\n### (TODO)\n\n### Additional Notes: Screen Capture\n\n`bgfx` provides screen capture functionalities, which of course can be directly called (see the official documentation and examples). For easier use, in `bigger` by default, just inserting the following one-line code into `update()` can capture the screen:\n\n```\nbgfx::requestScreenShot(BGFX_INVALID_HANDLE, \"/path/to/output\");\n```\n\nNote: On macOS, using the Metal backend somehow fails to capture the screen (not sure why; probably related to [this issue](https://github.com/bkaradzic/bgfx/issues/1833)). A possible quick fix is to use OpenGL.\n\n## License\n\nMIT License\n\n## Contribution\n\nIssue reports \u0026 pull requests are highly welcomed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuki-koyama%2Fbigger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyuki-koyama%2Fbigger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuki-koyama%2Fbigger/lists"}