feat: base visionOS bgfx implementation (#3289)

Co-authored-by: mani3xis <mariusz.pas+dev@protonmail.com>

fix: properly set storageMode

cleanup: remove unused variables

fix crash while releasing m_drawable on visionOS

fix: remove unused timing variable

fix: file name cases, cleanup

feat: integrate visionOS into bgfx examples
This commit is contained in:
Oskar Kwaśniewski
2024-06-03 17:14:53 +02:00
committed by GitHub
parent 00fa5ad179
commit 3195593d8d
8 changed files with 110 additions and 30 deletions

View File

@@ -1163,6 +1163,7 @@ namespace bgfx
preprocessor.setDefaultDefine("BX_PLATFORM_ANDROID");
preprocessor.setDefaultDefine("BX_PLATFORM_EMSCRIPTEN");
preprocessor.setDefaultDefine("BX_PLATFORM_IOS");
preprocessor.setDefaultDefine("BX_PLATFORM_VISIONOS");
preprocessor.setDefaultDefine("BX_PLATFORM_LINUX");
preprocessor.setDefaultDefine("BX_PLATFORM_OSX");
preprocessor.setDefaultDefine("BX_PLATFORM_PS4");
@@ -1228,12 +1229,19 @@ namespace bgfx
preprocessor.setDefine(glslDefine);
}
}
else if (0 == bx::strCmpI(platform, "ios") || (0 == bx::strCmpI(platform, "osx")) )
else if (
0 == bx::strCmpI(platform, "ios") ||
0 == bx::strCmpI(platform, "osx") ||
0 == bx::strCmpI(platform, "visionos")
)
{
if (0 == bx::strCmpI(platform, "osx"))
{
preprocessor.setDefine("BX_PLATFORM_OSX=1");
}
else if (0 == bx::strCmpI(platform, "visionos")) {
preprocessor.setDefine("BX_PLATFORM_VISIONOS=1");
}
else
{
preprocessor.setDefine("BX_PLATFORM_IOS=1");