-------------------------------------------------------------------------
| 1190 | } |
| 1191 | //------------------------------------------------------------------------- |
| 1192 | Window *VulkanRenderSystem::_createRenderWindow( const String &name, uint32 width, uint32 height, |
| 1193 | bool fullScreen, |
| 1194 | const NameValuePairList *miscParams ) |
| 1195 | { |
| 1196 | String windowType; |
| 1197 | if( miscParams ) |
| 1198 | { |
| 1199 | // Get variable-length params |
| 1200 | NameValuePairList::const_iterator opt = miscParams->find( "windowType" ); |
| 1201 | if( opt != miscParams->end() ) |
| 1202 | windowType = opt->second; |
| 1203 | } |
| 1204 | |
| 1205 | VulkanWindow *win = nullptr; |
| 1206 | if( windowType == "null" || mVulkanSupport->getInterfaceName() == "null" ) |
| 1207 | { |
| 1208 | win = OGRE_NEW VulkanWindowNull( name, width, height, fullScreen ); |
| 1209 | } |
| 1210 | else |
| 1211 | { |
| 1212 | #ifdef OGRE_VULKAN_WINDOW_WIN32 |
| 1213 | win = OGRE_NEW VulkanWin32Window( name, width, height, fullScreen ); |
| 1214 | #endif |
| 1215 | #ifdef OGRE_VULKAN_WINDOW_XCB |
| 1216 | win = OGRE_NEW VulkanXcbWindow( name, width, height, fullScreen ); |
| 1217 | #endif |
| 1218 | #ifdef OGRE_VULKAN_WINDOW_ANDROID |
| 1219 | win = OGRE_NEW VulkanAndroidWindow( name, width, height, fullScreen ); |
| 1220 | #endif |
| 1221 | } |
| 1222 | mWindows.insert( win ); |
| 1223 | |
| 1224 | if( !mInitialized ) |
| 1225 | { |
| 1226 | VulkanExternalDevice *externalDevice = 0; |
| 1227 | if( miscParams ) |
| 1228 | { |
| 1229 | NameValuePairList::const_iterator itOption = miscParams->find( "reverse_depth" ); |
| 1230 | if( itOption != miscParams->end() ) |
| 1231 | mReverseDepth = StringConverter::parseBool( itOption->second, true ); |
| 1232 | |
| 1233 | itOption = miscParams->find( "external_device" ); |
| 1234 | if( itOption != miscParams->end() ) |
| 1235 | { |
| 1236 | externalDevice = reinterpret_cast<VulkanExternalDevice *>( |
| 1237 | StringConverter::parseUnsignedLong( itOption->second ) ); |
| 1238 | } |
| 1239 | } |
| 1240 | |
| 1241 | initializeVkInstance(); |
| 1242 | |
| 1243 | if( !externalDevice ) |
| 1244 | mDevice = new VulkanDevice( mVkInstance, mVulkanSupport->getSelectedDeviceIdx(), this ); |
| 1245 | else |
| 1246 | mDevice = new VulkanDevice( mVkInstance, *externalDevice, this ); |
| 1247 | mActiveDevice = mDevice; |
| 1248 | |
| 1249 | mNativeShadingLanguageVersion = 450; |
nothing calls this directly
no test coverage detected