mirror of https://github.com/AxioDL/boo.git
Add gfxApi argument for X11; Win32 gfxApi logic fix
This commit is contained in:
parent
cbfd4ddad0
commit
68de1b5041
|
@ -131,7 +131,7 @@ public:
|
||||||
bool yes12 = false;
|
bool yes12 = false;
|
||||||
bool noD3d = false;
|
bool noD3d = false;
|
||||||
#if BOO_HAS_VULKAN
|
#if BOO_HAS_VULKAN
|
||||||
bool useVulkan = true;
|
bool useVulkan = false;
|
||||||
#endif
|
#endif
|
||||||
if (!gfxApi.empty())
|
if (!gfxApi.empty())
|
||||||
{
|
{
|
||||||
|
@ -144,6 +144,7 @@ public:
|
||||||
if (!gfxApi.compare("Vulkan"))
|
if (!gfxApi.compare("Vulkan"))
|
||||||
{
|
{
|
||||||
noD3d = true;
|
noD3d = true;
|
||||||
|
useVulkan = true;
|
||||||
}
|
}
|
||||||
if (!gfxApi.compare("OpenGL"))
|
if (!gfxApi.compare("OpenGL"))
|
||||||
{
|
{
|
||||||
|
@ -164,6 +165,13 @@ public:
|
||||||
{
|
{
|
||||||
useVulkan = false;
|
useVulkan = false;
|
||||||
yes12 = true;
|
yes12 = true;
|
||||||
|
noD3d = false;
|
||||||
|
}
|
||||||
|
if (!arg.compare(L"--d3d11"))
|
||||||
|
{
|
||||||
|
useVulkan = false;
|
||||||
|
yes12 = false;
|
||||||
|
noD3d = false;
|
||||||
}
|
}
|
||||||
if (!arg.compare(L"--vulkan"))
|
if (!arg.compare(L"--vulkan"))
|
||||||
{
|
{
|
||||||
|
@ -176,7 +184,15 @@ public:
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
if (!arg.compare(L"--d3d12"))
|
if (!arg.compare(L"--d3d12"))
|
||||||
|
{
|
||||||
yes12 = true;
|
yes12 = true;
|
||||||
|
noD3d = false;
|
||||||
|
}
|
||||||
|
if (!arg.compare(L"--d3d11"))
|
||||||
|
{
|
||||||
|
yes12 = false;
|
||||||
|
noD3d = false;
|
||||||
|
}
|
||||||
if (!arg.compare(L"--gl"))
|
if (!arg.compare(L"--gl"))
|
||||||
noD3d = true;
|
noD3d = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -68,10 +68,10 @@ int ApplicationRun(IApplication::EPlatformType platform,
|
||||||
if (APP)
|
if (APP)
|
||||||
return 1;
|
return 1;
|
||||||
if (platform == IApplication::EPlatformType::Wayland)
|
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 ||
|
else if (platform == IApplication::EPlatformType::Xlib ||
|
||||||
platform == IApplication::EPlatformType::Auto)
|
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
|
else
|
||||||
return 1;
|
return 1;
|
||||||
return APP->run();
|
return APP->run();
|
||||||
|
|
|
@ -32,6 +32,7 @@ public:
|
||||||
std::string_view friendlyName,
|
std::string_view friendlyName,
|
||||||
std::string_view pname,
|
std::string_view pname,
|
||||||
const std::vector<std::string>& args,
|
const std::vector<std::string>& args,
|
||||||
|
std::string_view gfxApi,
|
||||||
uint32_t samples,
|
uint32_t samples,
|
||||||
uint32_t anisotropy,
|
uint32_t anisotropy,
|
||||||
bool singleInstance)
|
bool singleInstance)
|
||||||
|
|
|
@ -225,6 +225,7 @@ public:
|
||||||
std::string_view friendlyName,
|
std::string_view friendlyName,
|
||||||
std::string_view pname,
|
std::string_view pname,
|
||||||
const std::vector<std::string>& args,
|
const std::vector<std::string>& args,
|
||||||
|
std::string_view gfxApi,
|
||||||
uint32_t samples,
|
uint32_t samples,
|
||||||
uint32_t anisotropy,
|
uint32_t anisotropy,
|
||||||
bool singleInstance)
|
bool singleInstance)
|
||||||
|
@ -240,6 +241,8 @@ public:
|
||||||
#if BOO_HAS_VULKAN
|
#if BOO_HAS_VULKAN
|
||||||
/* Check for Vulkan presence and preference */
|
/* Check for Vulkan presence and preference */
|
||||||
bool tryVulkan = true;
|
bool tryVulkan = true;
|
||||||
|
if (!gfxApi.compare("OpenGL"))
|
||||||
|
tryVulkan = false;
|
||||||
for (const std::string& arg : args)
|
for (const std::string& arg : args)
|
||||||
{
|
{
|
||||||
if (!arg.compare("--gl"))
|
if (!arg.compare("--gl"))
|
||||||
|
|
Loading…
Reference in New Issue