Adds function to better report active device type from GFXDevice

Ensures Window title and options menu correctly displays available and active render api
Fixes AA option so it correctly toggles FXAA
This commit is contained in:
Areloch 2020-12-12 23:04:50 -06:00
parent 196e80b9da
commit 334cd1d205
3 changed files with 46 additions and 8 deletions

View file

@ -1364,6 +1364,17 @@ DefineEngineFunction( getDisplayDeviceInformation, const char*, (),,
return adapter.getName();
}
DefineEngineFunction(getDisplayDeviceType, GFXAdapterType, (), ,
"Get the string describing the active GFX device type.\n"
"@ingroup GFX\n")
{
if (!GFXDevice::devicePresent())
return NullDevice;
const GFXAdapter& adapter = GFX->getAdapter();
return adapter.mType;
}
DefineEngineFunction( getBestHDRFormat, GFXFormat, (),,
"Returns the best texture format for storage of HDR data for the active device.\n"
"@ingroup GFX\n" )
@ -1388,4 +1399,4 @@ DefineEngineFunction( getBestHDRFormat, GFXFormat, (),,
DefineEngineFunction(ResetGFX, void, (), , "forces the gbuffer to be reinitialized in cases of improper/lack of buffer clears.")
{
GFX->beginReset();
}
}