bkaradzic / bgfx

Cross-platform, graphics API agnostic, "Bring Your Own Engine/Framework" style rendering library.
https://bkaradzic.github.io/bgfx/overview.html
BSD 2-Clause "Simplified" License
14.86k stars 1.93k forks source link

Request: Examples how to build for IOS, Android, etc in the documentation #1827

Open PabloPicose opened 5 years ago

PabloPicose commented 5 years ago

There is not a proper documentation how to build, i.e, for iOS, I found differnets issues here without a solution. Is there any oficial guide with the steps? Thx

petergilmour1987 commented 4 years ago

The way I do it for iOS is..............

cd bgfx ../bx/tools/bin/darwin/genie --gcc=ios-arm64 gmake make -R -C .build/projects/gmake-ios-arm64 config=release

I picked those lines out from the Makefile but there is probably an easier command, probably something like: make .build/projects/gmake-ios-arm64 and make .build/projects/gmake-ios-simulator

Then you've got: bgfx/.build/ios-arm64/bin/libbxRelease.a bgfx/.build/ios-arm64/bin/libbimgRelease.a bgfx/.build/ios-arm64/bin/libbgfxRelease.a

Then you just have to link them in your iOS app along with: UIKit Metal MetalKit OpenGLES QuartzCore

Also add bx/include, bimg/include and bgfx/include to the xcode header search paths

I use CMake to setup projects for all platforms but doing it straight in an XCode project is fine