+ // Query EGL extensions to check whether surfaceless context is supported
+ const char* const extensionStr = eglQueryString( mEglDisplay, EGL_EXTENSIONS );
+ std::istringstream stream(extensionStr);
+ std::string currentExtension;
+ while ( std::getline( stream, currentExtension, ' ' ) )
+ {
+ if ( currentExtension == EGL_KHR_SURFACELESS_CONTEXT )
+ {
+ mIsSurfacelessContextSupported = true;
+ break;
+ }
+ }
+