mirror of https://github.com/AxioDL/boo.git
macOS build fixes
This commit is contained in:
parent
b1ce75ed6e
commit
1a48dd9c42
|
@ -65,6 +65,7 @@ public:
|
||||||
SystemStringView friendlyName,
|
SystemStringView friendlyName,
|
||||||
SystemStringView pname,
|
SystemStringView pname,
|
||||||
const std::vector<SystemString>& args,
|
const std::vector<SystemString>& args,
|
||||||
|
std::string_view gfxApi,
|
||||||
uint32_t samples,
|
uint32_t samples,
|
||||||
uint32_t anisotropy)
|
uint32_t anisotropy)
|
||||||
: m_callback(callback),
|
: m_callback(callback),
|
||||||
|
@ -103,6 +104,8 @@ public:
|
||||||
/* Determine which graphics API to use */
|
/* Determine which graphics API to use */
|
||||||
#if BOO_HAS_METAL
|
#if BOO_HAS_METAL
|
||||||
bool useGL = false;
|
bool useGL = false;
|
||||||
|
if (!gfxApi.compare("OpenGL"))
|
||||||
|
useGL = true;
|
||||||
for (const SystemString& arg : args)
|
for (const SystemString& arg : args)
|
||||||
if (!arg.compare("--gl"))
|
if (!arg.compare("--gl"))
|
||||||
{
|
{
|
||||||
|
@ -237,7 +240,7 @@ int ApplicationRun(IApplication::EPlatformType platform,
|
||||||
platform != IApplication::EPlatformType::Auto)
|
platform != IApplication::EPlatformType::Auto)
|
||||||
return 1;
|
return 1;
|
||||||
/* Never deallocated to ensure window destructors have access */
|
/* Never deallocated to ensure window destructors have access */
|
||||||
APP = new ApplicationCocoa(cb, uniqueName, friendlyName, pname, args, samples, anisotropy);
|
APP = new ApplicationCocoa(cb, uniqueName, friendlyName, pname, args, gfxApi, samples, anisotropy);
|
||||||
}
|
}
|
||||||
[NSApp run];
|
[NSApp run];
|
||||||
ApplicationCocoa* appCocoa = static_cast<ApplicationCocoa*>(APP);
|
ApplicationCocoa* appCocoa = static_cast<ApplicationCocoa*>(APP);
|
||||||
|
|
|
@ -466,7 +466,7 @@ struct TestApplicationCallback : IApplicationCallback
|
||||||
" return tex.sample(samp, d.out_uv);\n"
|
" return tex.sample(samp, d.out_uv);\n"
|
||||||
"}\n";
|
"}\n";
|
||||||
|
|
||||||
pipeline = metalF.newShaderPipeline(VS, FS, nullptr, nullptr, vfmt, 1,
|
pipeline = metalF.newShaderPipeline(VS, FS, nullptr, nullptr, vfmt,
|
||||||
BlendFactor::One, BlendFactor::Zero, Primitive::TriStrips,
|
BlendFactor::One, BlendFactor::Zero, Primitive::TriStrips,
|
||||||
boo::ZTest::LEqual, true, true, true, boo::CullMode::None);
|
boo::ZTest::LEqual, true, true, true, boo::CullMode::None);
|
||||||
} else
|
} else
|
||||||
|
|
Loading…
Reference in New Issue