modified present3D to allow multiple --login arguments like osgViewer, added --login option to osgvnc example

This commit is contained in:
Laurens Voerman
2017-10-12 17:21:10 +02:00
parent adb6ae849d
commit 99491e46ec
2 changed files with 22 additions and 11 deletions

View File

@@ -336,14 +336,10 @@ int main( int argc, char **argv )
std::string url, username, password;
while(arguments.read("--login",url, username, password))
{
if (!osgDB::Registry::instance()->getAuthenticationMap())
{
osgDB::Registry::instance()->setAuthenticationMap(new osgDB::AuthenticationMap);
osgDB::Registry::instance()->getAuthenticationMap()->addAuthenticationDetails(
url,
new osgDB::AuthenticationDetails(username, password)
);
}
osgDB::Registry::instance()->getOrCreateAuthenticationMap()->addAuthenticationDetails(
url,
new osgDB::AuthenticationDetails(username, password)
);
}