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

Method parseScript

OgreMain/src/OgreHlmsManager.cpp:907–928  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

905 }
906 //-----------------------------------------------------------------------------------
907 void HlmsManager::parseScript( DataStreamPtr &stream, const String &groupName )
908 {
909 vector<char>::type fileData;
910 fileData.resize( stream->size() + 1 );
911 if( !fileData.empty() )
912 {
913 stream->read( &fileData[0], stream->size() );
914
915 String additionalTextureExtension;
916 ResourceToTexExtensionMap::const_iterator itExt =
917 mAdditionalTextureExtensionsPerGroup.find( groupName );
918
919 if( itExt != mAdditionalTextureExtensionsPerGroup.end() )
920 additionalTextureExtension = itExt->second;
921
922 // Add null terminator just in case (to prevent bad input)
923 fileData.back() = '\0';
924 HlmsJson hlmsJson( this, mJsonListener );
925 hlmsJson.loadMaterials( stream->getName(), groupName, &fileData[0],
926 additionalTextureExtension );
927 }
928 }
929 //-----------------------------------------------------------------------------------
930 Real HlmsManager::getLoadingOrder() const { return 100; }
931#endif

Calls 9

resizeMethod · 0.45
sizeMethod · 0.45
emptyMethod · 0.45
readMethod · 0.45
findMethod · 0.45
endMethod · 0.45
backMethod · 0.45
loadMaterialsMethod · 0.45
getNameMethod · 0.45

Tested by 1