PDA

View Full Version : help Any function can getTexture from memory?



feelthat
05-02-2013, 05:11 AM
mesh = pScene->getMesh( (GetBaseAppPath() + "game/girl-0408-head.x").c_str());
node->setMaterialTexture( 0,IrrlichtManager::GetIrrlichtManager()->GetDriver()->getTexture( (GetBaseAppPath() + "game/girl-hair.rttex").c_str() ));

////////////////////////want as follow

byte* mesh_mem;
byte* tex_mem;

//mesh_mem and tex_mem allocated data

mesh = pScene->getMesh( mesh_mem );
node->setMaterialTexture( 0,IrrlichtManager::GetIrrlichtManager()->GetDriver()->getTexture( tex_mem ));

feelthat
05-03-2013, 04:17 AM
IReadFile *f = device->getFileSystem()->createMemoryReadFile(buf, len, name, ture);
driver->getTexture(f);




mesh = pScene->getMesh( (GetBaseAppPath() + "game/girl-0408-head.x").c_str());
node->setMaterialTexture( 0,IrrlichtManager::GetIrrlichtManager()->GetDriver()->getTexture( (GetBaseAppPath() + "game/girl-hair.rttex").c_str() ));

////////////////////////want as follow

byte* mesh_mem;
byte* tex_mem;

//mesh_mem and tex_mem allocated data

mesh = pScene->getMesh( mesh_mem );
node->setMaterialTexture( 0,IrrlichtManager::GetIrrlichtManager()->GetDriver()->getTexture( tex_mem ));