Add gfxApi argument for X11; Win32 gfxApi logic fix

This commit is contained in:
Jack Andersen
2018-01-11 16:29:30 -10:00
parent cbfd4ddad0
commit 68de1b5041
4 changed files with 23 additions and 3 deletions

View File

@@ -68,10 +68,10 @@ int ApplicationRun(IApplication::EPlatformType platform,
if (APP)
return 1;
if (platform == IApplication::EPlatformType::Wayland)
APP = new ApplicationWayland(cb, uniqueName, friendlyName, pname, args, samples, anisotropy, singleInstance);
APP = new ApplicationWayland(cb, uniqueName, friendlyName, pname, args, gfxApi, samples, anisotropy, singleInstance);
else if (platform == IApplication::EPlatformType::Xlib ||
platform == IApplication::EPlatformType::Auto)
APP = new ApplicationXlib(cb, uniqueName, friendlyName, pname, args, samples, anisotropy, singleInstance);
APP = new ApplicationXlib(cb, uniqueName, friendlyName, pname, args, gfxApi, samples, anisotropy, singleInstance);
else
return 1;
return APP->run();

View File

@@ -32,6 +32,7 @@ public:
std::string_view friendlyName,
std::string_view pname,
const std::vector<std::string>& args,
std::string_view gfxApi,
uint32_t samples,
uint32_t anisotropy,
bool singleInstance)

View File

@@ -225,6 +225,7 @@ public:
std::string_view friendlyName,
std::string_view pname,
const std::vector<std::string>& args,
std::string_view gfxApi,
uint32_t samples,
uint32_t anisotropy,
bool singleInstance)
@@ -240,6 +241,8 @@ public:
#if BOO_HAS_VULKAN
/* Check for Vulkan presence and preference */
bool tryVulkan = true;
if (!gfxApi.compare("OpenGL"))
tryVulkan = false;
for (const std::string& arg : args)
{
if (!arg.compare("--gl"))