---------------------------------------------------------------------
| 1759 | } |
| 1760 | //--------------------------------------------------------------------- |
| 1761 | bool D3D11RenderSystem::validateDevice( bool forceDeviceElection ) |
| 1762 | { |
| 1763 | if( mDevice.isNull() ) |
| 1764 | return false; |
| 1765 | |
| 1766 | // The D3D Device is no longer valid if the elected adapter changes or if |
| 1767 | // the device has been removed. |
| 1768 | |
| 1769 | bool anotherIsElected = false; |
| 1770 | if( forceDeviceElection ) |
| 1771 | { |
| 1772 | // elect new device |
| 1773 | D3D11Driver *newDriver = getDirect3DDrivers( true )->findByName( mDriverName ); |
| 1774 | |
| 1775 | // check by LUID |
| 1776 | LUID newLUID = newDriver->getAdapterIdentifier().AdapterLuid; |
| 1777 | LUID prevLUID = mActiveD3DDriver.getAdapterIdentifier().AdapterLuid; |
| 1778 | anotherIsElected = |
| 1779 | ( newLUID.LowPart != prevLUID.LowPart ) || ( newLUID.HighPart != prevLUID.HighPart ); |
| 1780 | #if OGRE_DEBUG_MODE >= OGRE_DEBUG_HIGH |
| 1781 | anotherIsElected = true; // simulate switching device |
| 1782 | #endif |
| 1783 | } |
| 1784 | |
| 1785 | if( anotherIsElected || mDevice.IsDeviceLost() ) |
| 1786 | { |
| 1787 | handleDeviceLost(); |
| 1788 | |
| 1789 | return !mDevice.IsDeviceLost(); |
| 1790 | } |
| 1791 | |
| 1792 | return true; |
| 1793 | } |
| 1794 | //--------------------------------------------------------------------- |
| 1795 | VertexElementType D3D11RenderSystem::getColourVertexElementType() const { return VET_COLOUR_ABGR; } |
| 1796 | //--------------------------------------------------------------------- |
no test coverage detected