Closed neslib closed 8 years ago
i also looking now for tutorials on how to build this render on iOS with no much luck please share your findings Thank!
I have had a little bit of a wrestle with this myself. I am building the iOS static libraries for a Delphi language binding I am creating.
Building should be easy on OSX:
However, it seems that the current version does not compile because of references to the Metal framework. To work around this:
With that changes a attached to my first comment, you can build the 64-bit version using: make ios-arm64-release
Thanks , done this but im getting this error now :
In file included from ../../../src/hmd_openvr.cpp:9:
../../../3rdparty/openvr/openvr_capi.h:57:59: warning: integer literal is too large to be represented in type 'long' and is subject to undefined behavior under
C++98, interpreting as 'unsigned long'; this literal will have type 'long long' in C++11 onwards [-Wc++11-compat]
static const unsigned int k_unTrackedDeviceIndexInvalid = 4294967295;
^
1 warning generated.
hmd_ovr.cpp
image.cpp
renderer_d3d11.cpp
renderer_d3d12.cpp
renderer_d3d9.cpp
renderer_gl.cpp
renderer_mtl.mm
../../../src/renderer_mtl.mm:2418:25: fatal error: 'MTLTextureTypeCubeArray' is unavailable: not available on iOS
desc.textureType = MTLTextureTypeCubeArray;
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTexture.h:27:5: note:
'MTLTextureTypeCubeArray' has been explicitly marked unavailable here
MTLTextureTypeCubeArray NS_AVAILABLE_MAC(10_11) = 6,
^
1 error generated.
make[2]: *** [../../ios-arm/obj/Release/bgfx/src/renderer_mtl.o] Error 1
Please see my comment above for a (temporary) workaround for this
@neslib you should submit PR for your toolchain.lua changes.
Thanks. Added PRs for both bx toolchain and bgfx makefile. This does not fix the issue reported by meiry above (that is a separate issue).
Yeah, that's SDK version. I don't have workaround about that, Apple keeps their things incompatible. Upgrading it to latest would fix it.
OK. Will do. Thanks!
Looks like the current toolchain and makefile does not support ARM64 for iOS (which is required by Apple).
Support can be easily added to the files bx/scripts/toolchain.lua and bgfx/makefile. I have attached modifications to these files for review. arm64.zip