osgEarth 2.1.1
|
Functions | |
osgDB::ReaderWriter * | getReader (const std::string &url, const HTTPResponse &response) |
osgDB::ReaderWriter* anonymous_namespace{HTTPClient.cpp}::getReader | ( | const std::string & | url, |
const HTTPResponse & | response | ||
) |
Definition at line 795 of file HTTPClient.cpp.
{ osgDB::ReaderWriter* reader = 0L; // try to look up a reader by mime-type first: std::string mimeType = response.getMimeType(); if ( !mimeType.empty() ) { reader = osgEarth::Registry::instance()->getReaderWriterForMimeType(mimeType); } if ( !reader ) { // Try to find a reader by file extension. std::string ext = osgDB::getFileExtension( url ); reader = osgDB::Registry::instance()->getReaderWriterForExtension( ext ); } return reader; }