Search the Community
Showing results for tags 'RegisterAbstractPath C++'.
-
Hello all, We have created a LE application that answers our needs, and exported (compiled) it as a "dll" rather than an "exe" executable. Our main simulation.exe loads "OurLeApp.dll" and uses it to visualize the simulation. Very rarely, on some computers and on some projects, LE "fails to load" the resources (mat,dds etc.) of some gmf's that are included in the sbx file (for example, City.sbx, inside of it there is a model referenced as abstract::hospital.gmf). Although it cannot open the gmf models on the sbx, it shows the vegetation layers and the terrain surface. Of course when I move the entire terrain which is the "sbx, dat, raw etc. files, and the models referenced" to "Maps folder" in LESDK everything works, no problems. Our folder system is like : (Bold font indicates files&folders copied from LESDK) out ..simulation.exe ..Scripts ..bin ....ig ......leadwerksrenderer ........OurLeApp.dll ........engine.dll ........other LE related dlls ........shaders.pak ..data ....ig ......leadwerksrenderer ........Materials ........Models ........Sound ........and other necessary folders from LESDK ....entities ......minibus ........minibus.gmf ........minibus.mat ........minibus.dds ........minibus.lua ......airplane ........airplane.gmf ........airplane.mat ........airplane.dds ........airplane.lua ....terrains ......city ........city.sbx ........citymodelfiles ..........hospital.gmf ..........hospital.mat ..........hospital.dds ..........hospital.lua ..........school.gmf ..........school.mat ..........school.dds ..........school.lua First of all my working directory is out. "simulation.exe" is inside the "out folder" and started from there. At the initialization step of "OurLeApp" I use RegisterAbstractPath("./data/ig/leadwerksrenderer"); //(relative folder paths to out folder) RegisterAbstractPath("./data/terrains"); to make sure engine.dll sees both default LE files (out/data/ig/leadwerksrenderer) and terrain models (out/data/terrains) files. I do not register ./data/entities because I add them with LoadModel() and use exact paths (not abstract path). Again, this system works perfectly, but 1 out of 50 times, on some computers models and related files referenced in sbx with abstract paths cannot be found by LE. You have any idea ? One more question : is using RegisterAbstractPath twice correct ? Edit: I have divided the 1800+ files (hospital & school gmf,dds,mat,etc.) of the terrain into 4 folders. And now sbx gets opened. PC is win32bit btw if it helps. Edit2: sbx only fails to load gmf's, since it cannot open gmf's, it never searches for related mats or dds' anyway.