MCPcopy Create free account
hub / github.com/OGRECave/ogre-next / _initialise

Method _initialise

RenderSystems/Direct3D11/src/OgreD3D11RenderSystem.cpp:741–892  ·  view source on GitHub ↗

---------------------------------------------------------------------

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 15

_createRenderWindowMethod · 0.95
fireDeviceEventMethod · 0.95
IsWorkingUnderNsightFunction · 0.85
rfindMethod · 0.80
getVideoModeListMethod · 0.80
getDescriptionMethod · 0.80
getColourDepthMethod · 0.80
toStringFunction · 0.50
logMessageMethod · 0.45
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected