{"id":18439069,"url":"https://github.com/demonstrandum/playground","last_synced_at":"2025-04-14T13:24:39.204Z","repository":{"id":96636449,"uuid":"603149052","full_name":"Demonstrandum/Playground","owner":"Demonstrandum","description":"C++ Starting point for windowed applications using GLFW with BGFX including ImGui to get started.  Builds cross-platform with Bazel.","archived":false,"fork":false,"pushed_at":"2023-05-18T17:44:40.000Z","size":1259,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-16T10:44:52.739Z","etag":null,"topics":["bazel","bgfx","cpp","freetype","glfw","imgui","linalg"],"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/Demonstrandum.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":"2023-02-17T18:08:43.000Z","updated_at":"2023-10-20T02:59:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"6e6f47cc-d688-468e-a44e-be27371ec48d","html_url":"https://github.com/Demonstrandum/Playground","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/Demonstrandum%2FPlayground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Demonstrandum%2FPlayground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Demonstrandum%2FPlayground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Demonstrandum%2FPlayground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Demonstrandum","download_url":"https://codeload.github.com/Demonstrandum/Playground/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248887234,"owners_count":21177845,"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":["bazel","bgfx","cpp","freetype","glfw","imgui","linalg"],"created_at":"2024-11-06T06:23:15.699Z","updated_at":"2025-04-14T13:24:39.168Z","avatar_url":"https://github.com/Demonstrandum.png","language":"C++","readme":"# Playground\r\n\r\nGetting something drawing on the screen is a pain.\r\n\r\nThis is a simple starting point for a windowed cross-platform graphical application.\r\n\r\n- Windowing: GLFW\r\n- Graphics: BGFX (API over OpenGL, DirectX, Vulkan, Metal, \u0026c.)\r\n- Debug GUI: ImGui\r\n- Linear algebra library: `linalg.h`\r\n- Text rendering: FreeType2\r\n\r\nSee `example.cpp` for short example usage.\r\n\r\n## Build\r\n\r\nBazel takes care of building everything on every platform.\r\nYou don't need to clone `glfw`, `bx`, `bimg`, `bgfx`, `imgui`, \u0026c., and figure out how to compile them,\r\nBazel takes care of cloning and building (see `WORKSPACE` and `bgfx.BUILD` (\u0026c.) files).\r\n\r\n```sh\r\n# build with\r\nbazel build //src:playground\r\n# or run example immediately\r\nbazel run //:playground-example\r\n```\r\n\r\n### Notes\r\n\r\nInstall Bazel, see [bazel.build/install](https://bazel.build/install).\r\n\r\n- On Windows you will need to install Visual Studio (the IDE) or at least the Windows {10,11} SDK to use the MSVC compiler. After Bazel is installed (recommend through Chocolatey, `choco install bazel`), you need to modify your users environment variables to have `BAZEL_VC` point to your `VC` folder containing your compiler tools.\r\n- macOS and *nix environments are more straightforward. Just install Bazel with `brew install bazel` or through your native package manager. Make sure Java version ≥11 is available/default.\r\n\r\n![macos-screenshot](https://user-images.githubusercontent.com/26842759/220960536-9875f36d-09df-491a-bb5c-ed5e35119799.png)\r\n\u003c!-- ![windows-screenshot](https://user-images.githubusercontent.com/26842759/220960544-1271bf7a-1d1c-45ac-9f2e-14993e81219d.png) --\u003e\r\n\r\n## TODO\r\n\r\n- [x] macOS working (checked on `arm/aarch64`: Ventura)\r\n- [x] Windows working (checked on `arm/aarch64`: Windows 11)\r\n- [x] Linux working (checked on `arm/aarch64`: Asahi Linux X11/Wayland)\r\n- [ ] Wayland has serious fractional scaling issues and no support for GNOME native window decoration. Upstream problems.\r\n- [ ] *BSD working (not checked)\r\n- [x] macOS native window customisation\r\n- [ ] Windows native window customisation\r\n- [ ] Linux Qt/Gtk native window customisation\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdemonstrandum%2Fplayground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdemonstrandum%2Fplayground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdemonstrandum%2Fplayground/lists"}