---------------------------------------------------------------------
| 739 | } |
| 740 | //--------------------------------------------------------------------- |
| 741 | Window *D3D11RenderSystem::_initialise( bool autoCreateWindow, const String &windowTitle ) |
| 742 | { |
| 743 | Window *autoWindow = NULL; |
| 744 | LogManager::getSingleton().logMessage( "D3D11: Subsystem Initialising" ); |
| 745 | |
| 746 | if( IsWorkingUnderNsight() ) |
| 747 | LogManager::getSingleton().logMessage( "D3D11: Nvidia Nsight found" ); |
| 748 | |
| 749 | // Init using current settings |
| 750 | ConfigOptionMap::iterator opt = mOptions.find( "Rendering Device" ); |
| 751 | if( opt == mOptions.end() ) |
| 752 | OGRE_EXCEPT( Exception::ERR_INVALIDPARAMS, "Can`t find requested Direct3D driver name!", |
| 753 | "D3D11RenderSystem::initialise" ); |
| 754 | mDriverName = opt->second.currentValue; |
| 755 | |
| 756 | // Driver type |
| 757 | opt = mOptions.find( "Driver type" ); |
| 758 | if( opt == mOptions.end() ) |
| 759 | OGRE_EXCEPT( Exception::ERR_INTERNAL_ERROR, "Can't find driver type!", |
| 760 | "D3D11RenderSystem::initialise" ); |
| 761 | mDriverType = D3D11Device::parseDriverType( opt->second.currentValue ); |
| 762 | |
| 763 | opt = mOptions.find( "Information Queue Exceptions Bottom Level" ); |
| 764 | if( opt == mOptions.end() ) |
| 765 | OGRE_EXCEPT( Exception::ERR_INTERNAL_ERROR, |
| 766 | "Can't find Information Queue Exceptions Bottom Level option!", |
| 767 | "D3D11RenderSystem::initialise" ); |
| 768 | D3D11Device::setExceptionsErrorLevel( opt->second.currentValue ); |
| 769 | |
| 770 | #if OGRE_NO_QUAD_BUFFER_STEREO == 0 |
| 771 | // Stereo driver must be created before device is created |
| 772 | StereoModeType stereoMode = |
| 773 | StringConverter::parseStereoMode( mOptions["Stereo Mode"].currentValue ); |
| 774 | D3D11StereoDriverBridge *stereoBridge = OGRE_NEW D3D11StereoDriverBridge( stereoMode ); |
| 775 | #endif |
| 776 | |
| 777 | // create the device for the selected adapter |
| 778 | createDevice(); |
| 779 | |
| 780 | if( autoCreateWindow ) |
| 781 | { |
| 782 | bool fullScreen; |
| 783 | opt = mOptions.find( "Full Screen" ); |
| 784 | if( opt == mOptions.end() ) |
| 785 | OGRE_EXCEPT( Exception::ERR_INTERNAL_ERROR, "Can't find full screen option!", |
| 786 | "D3D11RenderSystem::initialise" ); |
| 787 | fullScreen = opt->second.currentValue == "Yes"; |
| 788 | |
| 789 | D3D11VideoMode *videoMode = NULL; |
| 790 | unsigned int width, height; |
| 791 | String temp; |
| 792 | |
| 793 | opt = mOptions.find( "Video Mode" ); |
| 794 | if( opt == mOptions.end() ) |
| 795 | OGRE_EXCEPT( Exception::ERR_INTERNAL_ERROR, "Can't find Video Mode option!", |
| 796 | "D3D11RenderSystem::initialise" ); |
| 797 | |
| 798 | // The string we are manipulating looks like this :width x height @ colourDepth |
nothing calls this directly
no test coverage detected