{"id":17331103,"url":"https://github.com/mosra/magnum-bootstrap","last_synced_at":"2025-04-05T20:08:02.173Z","repository":{"id":10146655,"uuid":"12223360","full_name":"mosra/magnum-bootstrap","owner":"mosra","description":"Bootstrap projects for the Magnum C++11 graphics engine","archived":false,"fork":false,"pushed_at":"2024-10-24T10:59:40.000Z","size":607,"stargazers_count":94,"open_issues_count":5,"forks_count":37,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-29T19:06:35.671Z","etag":null,"topics":["android","c-plus-plus","c-plus-plus-11","c-plus-plus-14","cmake","emscripten","game-engine","gamedev","graphics-engine","ios","linux","magnum","opengl","opengl-es","osx","webassembly","webgl","windows"],"latest_commit_sha":null,"homepage":"https://magnum.graphics/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mosra.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"COPYING","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":"2013-08-19T17:47:54.000Z","updated_at":"2025-01-12T11:25:21.000Z","dependencies_parsed_at":"2024-10-24T17:06:09.834Z","dependency_job_id":null,"html_url":"https://github.com/mosra/magnum-bootstrap","commit_stats":{"total_commits":107,"total_committers":2,"mean_commits":53.5,"dds":0.009345794392523366,"last_synced_commit":"b0baec0f5bfcf57b582d321025b20113ff37acc6"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mosra%2Fmagnum-bootstrap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mosra%2Fmagnum-bootstrap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mosra%2Fmagnum-bootstrap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mosra%2Fmagnum-bootstrap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mosra","download_url":"https://codeload.github.com/mosra/magnum-bootstrap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247393570,"owners_count":20931812,"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":["android","c-plus-plus","c-plus-plus-11","c-plus-plus-14","cmake","emscripten","game-engine","gamedev","graphics-engine","ios","linux","magnum","opengl","opengl-es","osx","webassembly","webgl","windows"],"created_at":"2024-10-15T14:53:29.688Z","updated_at":"2025-04-05T20:08:02.142Z","avatar_url":"https://github.com/mosra.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"This repository contains \"bootstrap projects\" for the Magnum C++11/C++14\ngraphics engine.\n\n[![Join the chat at https://gitter.im/mosra/magnum](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/mosra/magnum?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n[![Build Status](https://circleci.com/gh/mosra/magnum-bootstrap.svg?style=shield)](https://circleci.com/gh/mosra/magnum-bootstrap)\n[![Build Status](https://travis-ci.com/mosra/magnum-bootstrap.svg?branch=master)](https://travis-ci.com/mosra/magnum-bootstrap)\n[![Build Status](https://ci.appveyor.com/api/projects/status/90yi0xhj3pmkk1ig/branch/master?svg=true)](https://ci.appveyor.com/project/mosra/magnum-bootstrap/branch/master)\n[![UNLICENSE](https://img.shields.io/badge/license-UNLICENSE-blue.svg)](http://unlicense.org/)\n\n-   Project homepage — https://magnum.graphics/\n-   Documentation — https://doc.magnum.graphics/\n-   GitHub project page — https://github.com/mosra/magnum-bootstrap\n\nSetting up a new project can be pretty gruesome and nobody likes repeating the\nsame process every time. This repository provides \"bootstrap\" project\nstructures for many use cases, helping you get up and running in no time.\n\nUSAGE\n=====\n\nTo use Magnum, you obviously need to have Magnum installed. The whole building\nand installation process (along with the following guide) is thoroughly\nexplained in Magnum documentation, particularly in the\n[Getting Started Guide](https://doc.magnum.graphics/magnum/getting-started.html).\n\nMinimal dependencies\n--------------------\n\n*   C++ compiler with good C++11 support. Compilers which are tested to have\n    everything needed are **GCC** \u003e= 4.8.1, **Clang** \u003e= 3.3 and\n    **MSVC** \u003e= 2015. On Windows you can also use **clang-cl** and\n    **MinGW-w64**.\n*   **CMake** \u003e= 3.5\n*   **Corrade**, **Magnum** — The engine itself\n\nNote that each bootstrap project has additional dependency requirements, listed\nbelow. See [Magnum building documentation](https://doc.magnum.graphics/magnum/building.html)\nfor more information.\n\nBootstrapping the project\n-------------------------\n\nDesired usage is to download selected branch from the list below as an archive\n(using the Download button in GitHub) or by using URL similar to one of the\nfollowing (replace `\u003cbranch\u003e` with desired branch name):\n\n    https://github.com/mosra/magnum-bootstrap/archive/\u003cbranch\u003e.tar.gz\n    https://github.com/mosra/magnum-bootstrap/archive/\u003cbranch\u003e.zip\n\nAfter extracting the downloaded archive you can build and run the application\nwith these four commands:\n\n    mkdir build \u0026\u0026 cd build\n    cmake ..\n    cmake --build .\n    ./src/MyApplication # or ./src/Debug/MyApplication\n\nFor crosscompiling (in `base-nacl` and `base-emscripten` branches, see below)\nyou will need to have the `toolchains` submodule. It is present in Git clone\nand can be updated with these commands:\n\n    git submodule init\n    git submodule update\n\nHowever, because you should use downloaded archive anyway, you need to manually\ndownload snapshot of toolchains repository from https://github.com/mosra/toolchains\nand put the contents in `toolchains/` subdirectory.\n\nContents of the repository\n--------------------------\n\nThis `master` branch contains just an README file and the actual bootstrap\nprojects are in various other branches, each covering some particular use case.\n\n### Base application\n\nThe [`base`](https://github.com/mosra/magnum-bootstrap/tree/base) branch\ncontains barebones windowed application using `Platform::Sdl2Application` with\nonly the essential files. You need Magnum built with `WITH_SDL2APPLICATION`\nenabled.\n\n### Base application using GLFW\n\nThe [`base-glfw`](https://github.com/mosra/magnum-bootstrap/tree/base-glfw)\nbranch is similar to `base` one, except that it uses `Platform::GlfwApplication`\ninstead of `Platform::Sdl2Application`. You need Magnum built with\n`WITH_GLFWAPPLICATION` enabled.\n\n### Base application using gtkmm\n\nThe [`base-gtkmm`](https://github.com/mosra/magnum-bootstrap/tree/base-gtkmm)\nbranch does not use any of the application wrappers provided in `Platform`\nnamespace, but uses gtkmm window and context creation directly and manually\ninitializes Magnum on top of that using EGL on embedded devices, WGL on\nWindows, CGL on macOS and GLX on Unix/Linux. You need Magnum built with\n`WITH_EGLCONTEXT`, `WITH_WGLCONTEXT`, `WITH_CGLCONTEXT` or `WITH_GLXCONTEXT`\nenabled, depending on the platform of your choice.\n\n### Base application using Qt\n\nThe [`base-qt`](https://github.com/mosra/magnum-bootstrap/tree/base-qt)\nbranch does not use any of the application wrappers provided in `Platform`\nnamespace, but uses Qt5 window and context creation directly and manually\ninitializes Magnum on top of that using EGL on embedded devices, WGL on\nWindows, CGL on macOS and GLX on Unix/Linux. You need Magnum built with\n`WITH_EGLCONTEXT`, `WITH_WGLCONTEXT`, `WITH_CGLCONTEXT` or `WITH_GLXCONTEXT`\nenabled, depending on the platform of your choice.\n\n### Base application using wxWidgets\n\nThe [`base-wxwidgets`](https://github.com/mosra/magnum-bootstrap/tree/base-wxwidgets)\nbranch does not use any of the application wrappers provided in `Platform`\nnamespace, but uses wxWidgets window and context creation directly and\nmanually initializes Magnum on top of that using EGL on embedded devices, WGL\non Windows, CGL on macOS and GLX on Unix/Linux. You need Magnum built with\n`WITH_EGLCONTEXT`, `WITH_WGLCONTEXT`, `WITH_CGLCONTEXT` or `WITH_GLXCONTEXT`\nenabled, depending on the platform of your choice.\n\n### Windowless application\n\nThe [`windowless`](https://github.com/mosra/magnum-bootstrap/tree/windowless)\nbranch contains windowless application using `Platform::WindowlessGlxApplication`\non X11-based Unix, `Platform::WindowlessCglApplication` on macOS,\n`Platform::WindowlessWglApplication` on Windows, `Platform::WindowlessWindowsEglApplication`\non Windows GLES or ANGLE, `Platform::WindowlessEglApplication` on headless\nsystems supporting EGL and `Platform::WindowlessIosApplication` on iOS. Useful\nfor querying information about the renderer, offscreen rendering, image\nprocessing etc. You need Magnum built with `WITH_WINDOWLESS*APPLICATION`\nenabled, depending on the platform of your choice.\n\n### Scene graph\n\nThe [`scenegraph2D`](https://github.com/mosra/magnum-bootstrap/tree/scenegraph2D)\nand [`scenegraph3D`](https://github.com/mosra/magnum-bootstrap/tree/scenegraph3D)\nbranches contain application prepared for using 2D/3D `SceneGraph`. You need\nMagnum built with `WITH_SDL2APPLICATION` and `WITH_SCENEGRAPH` enabled.\n\n### Base application with port to Emscripten\n\nThe [`base-emscripten`](https://github.com/mosra/magnum-bootstrap/tree/base-emscripten)\nbranch contains application using `Platform::Sdl2Application` for desktop and\nand `Platform::EmscriptenApplication` for Emscripten build. For desktop build\nyou need Magnum built with `WITH_SDL2APPLICATION` enabled and you can use the\ncommands above to build it.\n\nFor Emscripten build you need to have Emscripten installed with Corrade and\nMagnum crosscompiled for Emscripten, don't forget to build Magnum with\n`WITH_EMSCRIPTENAPPLICATION` enabled. See\n[Corrade's](https://doc.magnum.graphics/corrade/building-corrade.html#building-corrade-cross-emscripten)\nand [Magnum's](https://doc.magnum.graphics/magnum/building.html#building-cross-emscripten)\nbuilding documentation for more information.\n\nIn the `toolchains/` submodule there are two toolchain files. The\n`generic/Emscripten.cmake` is for the classical (asm.js) build, the\n`generic/Emscripten-wasm.cmake` is for WebAssembly build. Don't forget to adapt\n`EMSCRIPTEN_PREFIX` variable in `generic/Emscripten*.cmake` to path where\nEmscripten is installed; you can also pass it explicitly on command-line using\n`-DEMSCRIPTEN_PREFIX`. Default is `/usr/lib/emscripten`.\n\nThen create build directory and run `cmake` and build/install commands in it.\nSet `CMAKE_PREFIX_PATH` to where you have all the dependencies installed, set\n`CMAKE_INSTALL_PREFIX` to have the files installed in proper location (a\nwebserver, e.g.  `/srv/http/emscripten`).\n\n    mkdir build-emscripten \u0026\u0026 cd build-emscripten\n    cmake .. \\\n        -DCMAKE_TOOLCHAIN_FILE=path/to/toolchains/generic/Emscripten-wasm.cmake \\\n        -DCMAKE_PREFIX_PATH=/usr/lib/emscripten/system \\\n        -DCMAKE_INSTALL_PREFIX=/srv/http/emscripten\n    cmake --build .\n    cmake --build . --target install\n\nYou can then open `MyApplication.html` in your browser (through webserver, e.g.\n`http://localhost/emscripten/MyApplication.html`).\n\n### Windowless application with port to Emscripten\n\nThe [`windowless-emscripten`](https://github.com/mosra/magnum-bootstrap/tree/base-emscripten)\nbranch contains a version of the `windowless` bootstrap project which in\naddition uses `Platform::WindowlessEglApplication` for Emscripten build. You\nneed Magnum built with `WITH_WINDOWLESS*APPLICATION` enabled depending on your\nplatform of choice and you can use the commands above to build the desktop\nversion.\n\nFor Emscripten build you need to have Emscripten installed with Corrade and\nMagnum crosscompiled for Emscripten, don't forget to build Magnum with\n`WITH_WINDOWLESSEGLAPPLICATION` enabled. See\n[Corrade's](https://doc.magnum.graphics/corrade/building-corrade.html#building-corrade-cross-emscripten)\nand [Magnum's](https://doc.magnum.graphics/magnum/building.html#building-cross-emscripten)\nbuilding documentation for more information.\n\nIn the `toolchains/` submodule there are two toolchain files. The\n`generic/Emscripten.cmake` is for the classical (asm.js) build, the\n`generic/Emscripten-wasm.cmake` is for WebAssembly build. Don't forget to adapt\n`EMSCRIPTEN_PREFIX` variable in `generic/Emscripten*.cmake` to path where\nEmscripten is installed; you can also pass it explicitly on command-line using\n`-DEMSCRIPTEN_PREFIX`. Default is `/usr/lib/emscripten`.\n\nThen create build directory and run `cmake` and build/install commands in it.\nSet `CMAKE_PREFIX_PATH` to where you have all the dependencies installed, set\n`CMAKE_INSTALL_PREFIX` to have the files installed in proper location (a\nwebserver, e.g.  `/srv/http/emscripten`).\n\n    mkdir build-emscripten \u0026\u0026 cd build-emscripten\n    cmake .. \\\n        -DCMAKE_TOOLCHAIN_FILE=path/to/toolchains/generic/Emscripten-wasm.cmake \\\n        -DCMAKE_PREFIX_PATH=/usr/lib/emscripten/system \\\n        -DCMAKE_INSTALL_PREFIX=/srv/http/emscripten\n    cmake --build .\n    cmake --build . --target install\n\nYou can then open `MyApplication.html` in your browser (through webserver, e.g.\n`http://localhost/emscripten/MyApplication.html`).\n\n### Base application with port to Android\n\nThe [`base-android`](https://github.com/mosra/magnum-bootstrap/tree/base-android)\nbranch contains application using `Platform::Sdl2Application` for desktop build\nand `Platform::AndroidApplication` for Android build. For desktop build you\nneed Magnum built with `WITH_SDL2APPLICATION` enabled and you can use the\ncommands above to build it.\n\nFor Android build you need to have Android NDK installed with Corrade and\nMagnum crosscompiled for Android, Magnum built with `WITH_ANDROIDAPPLICATION`\nenabled. See [Corrade's](https://doc.magnum.graphics/corrade/building-corrade.html#building-corrade-cross-android)\nand [Magnum's](https://doc.magnum.graphics/magnum/building.html#building-cross-android)\nbuilding documentation for more information.\n\nIn order to build the application and install it on your device, use Gradle:\n\n    gradle build\n    gradle installDebug\n\n### Base application with port to iOS\n\nThe [`base-ios`](https://github.com/mosra/magnum-bootstrap/tree/base-ios)\nbranch contains application using `Platform::Sdl2Application` for both desktop\nand iOS build. You need Magnum built with `WITH_SDL2APPLICATION` enabled and\nyou can use the commands above to build the desktop version.\n\nFor iOS you need macOS and XCode installed with Corrade and Magnum\ncrosscompiled for iOS, don't forget to build Magnum with `WITH_SDL2APPLICATION`\nenabled. See [Corrade's](https://doc.magnum.graphics/corrade/building-corrade.html#building-corrade-cross-ios)\nand [Magnum's](https://doc.magnum.graphics/magnum/building.html#building-cross-ios)\nbuilding documentation for more information.\n\nThen create build directory and run `cmake` to generate the Xcode project. Set\n`CMAKE_OSX_ROOT` to SDK you want to target and enable all desired architectures\nin `CMAKE_OSX_ARCHITECTURES`. Set `CMAKE_PREFIX_PATH` to the directory where\nyou have all the dependencies.\n\n    mkdir build-ios \u0026\u0026 cd build-ios\n    cmake .. \\\n        -DCMAKE_TOOLCHAIN_FILE=path/to/toolchains/generic/iOS.cmake \\\n        -DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk \\\n        -DCMAKE_OSX_ARCHITECTURES=\"arm64;armv7;armv7s\" \\\n        -DCMAKE_PREFIX_PATH=~/ios-libs \\\n        -G Xcode\n\nYou can then open the generated project file in Xcode and build/deploy it from\nthere.\n\n### Base application with port to Windows RT (Store/Phone)\n\nThe [`base-winrt`](https://github.com/mosra/magnum-bootstrap/tree/base-winrt)\nbranch contains application using `Platform::Sdl2Application` for both desktop\nand Windows RT build. You need Magnum built with `WITH_SDL2APPLICATION` enabled\nand you can use the commands above to build the desktop version.\n\nFor Windows RT build you need to have at least Windows 8.1, Visual Studio 2013\nand Windows 8.1 Store/Phone SDK installed with Corrade and Magnum crosscompiled\nfor Windows RT, don't forget to build Magnum with `WITH_SDL2APPLICATION` enabled.\nSee [Corrade's](https://doc.magnum.graphics/corrade/building-corrade.html#building-corrade-cross-winrt)\nand [Magnum's](https://doc.magnum.graphics/magnum/building.html#building-cross-winrt)\nbuilding documentation for more information.\n\nYou need to provide [your own `*.pfx` certificate file](https://msdn.microsoft.com/en-us/library/windows/desktop/jj835832.aspx)\nand pass it to CMake in a `SIGNING_CERTIFICATE` variable. The bootstrap\napplication assumes that SDL2 and ANGLE is built as DLL and both Corrade and\nMagnum are built statically. Assuming the native Corrade installation is in\n`C:/Sys` and all WinRT dependencies are in `C:/Sys-winrt`, the build can be\ndone similarly to the following:\n\n    mkdir build-winrt \u0026\u0026 cd build-winrt\n    cmake .. ^\n        -DCORRADE_RC_EXECUTABLE=\"C:/Sys/bin/corrade-rc.exe\" ^\n        -DCMAKE_PREFIX_PATH=\"C:/Sys-winrt\" ^\n        -DCMAKE_SYSTEM_NAME=WindowsStore ^\n        -DCMAKE_SYSTEM_VERSION=8.1 ^\n        -DSIGNING_CERTIFICATE=\u003cpath-to-your-pfx-file\u003e ^\n        -G \"Visual Studio 14 2015\"\n    cmake --build .\n\nChange `WindowsStore` to `WindowsPhone` if you want to build for Windows Phone\ninstead. The `build-winrt/src/AppPackages` directory will then contain the\nfinal package along with a PowerShell script for easy local installation.\n\nCONTACT \u0026 SUPPORT\n=================\n\nIf you want to contribute to Magnum, if you spotted a bug, need a feature or\nhave an awesome idea, you can get a copy of the sources from GitHub and start\nright away! There is the already mentioned guide about\n[how to download and build Magnum](https://doc.magnum.graphics/magnum/building.html)\nand also a guide about [coding style and best practices](https://doc.magnum.graphics/magnum/coding-style.html)\nwhich you should follow to keep the library as consistent and maintainable as\npossible.\n\n-   Project homepage — https://magnum.graphics/\n-   Documentation — https://doc.magnum.graphics/\n-   GitHub — https://github.com/mosra/magnum-bootstrap and the\n    [#magnum](https://github.com/topics/magnum) topic\n-   GitLab — https://gitlab.com/mosra/magnum-bootstrap\n-   Gitter community chat — https://gitter.im/mosra/magnum\n-   E-mail — info@magnum.graphics\n-   Google Groups mailing list — magnum-engine@googlegroups.com\n    ([archive](https://groups.google.com/forum/#!forum/magnum-engine))\n-   Twitter — https://twitter.com/czmosra and the\n    [#MagnumEngine](https://twitter.com/hashtag/MagnumEngine) hashtag\n\nSee also the Magnum Project [Contact \u0026 Support page](https://magnum.graphics/contact/)\nfor further information.\n\nLICENSE\n=======\n\nWhile Magnum itself and its documentation are licensed under the MIT/Expat\nlicense, all boostrap projects are put into public domain (or UNLICENSE) to\nfree you from any legal obstacles when reusing the code in your apps. See the\n[COPYING](COPYING) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmosra%2Fmagnum-bootstrap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmosra%2Fmagnum-bootstrap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmosra%2Fmagnum-bootstrap/lists"}