anthony.liot Posted April 16, 2013 Posted April 16, 2013 Hi, I have some mesh inside zip, and i want create Mesh using the data (unsigned char*) i have with the zip->readFile method, but apparently GLMesh can load only from file.There is a way to do this without write the file on the HDD passing directly the data to my GLMesh.Thanks
frustum Posted April 16, 2013 Posted April 16, 2013 Engine overrides a base File class. You have to create same class substitution. Or much simple solution is to use buffered files [script]: string name = "temp.mesh"; engine.filesystem.addBufferFile(name); File file = new File(); if(file.open(name,"wb")) { // write data into file file.close(); } delete file; // load mesh from file ObjectMesh mesh = new ObjectMesh(name); engine.filesystem.removeBufferFile(name);
Recommended Posts