mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-06 05:50:31 +00:00
GFX now handles non-default adapters
The GFX (DirectX) pipeline did not respect the choice of adapter and always went for the default one. Normally this isn't an issue unless you wish to target a particular adapter and display device combination. This has been corrected. The GFX initialize functions now attempt to find the best adapter that matches a given display device (i.e. monitor) if one has been passed in. To aid with choosing a display device some new monitor enumeration methods have been added to the platform window manager. These methods have been exposed to the Canvas.
This commit is contained in:
parent
1ed1a41256
commit
0d77cdc270
18 changed files with 282 additions and 45 deletions
|
|
@ -2314,6 +2314,40 @@ DefineEngineMethod( GuiCanvas, setWindowTitle, void, ( const char* newTitle),,
|
|||
}
|
||||
|
||||
|
||||
DefineEngineMethod( GuiCanvas, findFirstMatchingMonitor, S32, (const char* name),,
|
||||
"@brief Find the first monitor index that matches the given name.\n\n"
|
||||
"The actual match algorithm depends on the implementation.\n"
|
||||
"@param name The name to search for.\n\n"
|
||||
"@return The number of monitors attached to the system, including the default monoitor.")
|
||||
{
|
||||
return PlatformWindowManager::get()->findFirstMatchingMonitor(name);
|
||||
}
|
||||
|
||||
DefineEngineMethod( GuiCanvas, getMonitorCount, S32, (),,
|
||||
"@brief Gets the number of monitors attached to the system.\n\n"
|
||||
|
||||
"@return The number of monitors attached to the system, including the default monoitor.")
|
||||
{
|
||||
return PlatformWindowManager::get()->getMonitorCount();
|
||||
}
|
||||
|
||||
DefineEngineMethod( GuiCanvas, getMonitorName, const char*, (S32 index),,
|
||||
"@brief Gets the name of the requested monitor.\n\n"
|
||||
"@param index The monitor index.\n\n"
|
||||
"@return The name of the requested monitor.")
|
||||
{
|
||||
return PlatformWindowManager::get()->getMonitorName(index);
|
||||
}
|
||||
|
||||
DefineEngineMethod( GuiCanvas, getMonitorRect, RectI, (S32 index),,
|
||||
"@brief Gets the region of the requested monitor.\n\n"
|
||||
"@param index The monitor index.\n\n"
|
||||
"@return The rectangular region of the requested monitor.")
|
||||
{
|
||||
return PlatformWindowManager::get()->getMonitorRect(index);
|
||||
}
|
||||
|
||||
|
||||
DefineEngineMethod( GuiCanvas, getVideoMode, const char*, (),,
|
||||
"@brief Gets the current screen mode as a string.\n\n"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue