You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers. No questions about C++ programming or topics which are answered in the tutorials!
I am trying to load a mesh from a ZIP archive. It seems that the archive code doesn't apply the VIRTUAL working directory when searching for the file in the archive. In the archive it's "media/modelname/model.x" and the images are in the same directory. When I debug I never see the VIRTUAL working directory applied if I just pass in the file name "model.x" when using virtual directory "media/modelname". Is this a bug or as intended and I have to find another way of organizing my files?
I forgot to mention... this code includes support if the model is in a native directory as well. That is why there are so many calls to setting the working directory.
Also, if I specify the entire VIRTUAL path of the model, the images don't load because the images in the mesh don't have relative path of the base working directory.
Hmm, I'm not really usre if this feature is implemented for all file system types. Is there a description somewhere what should happen? This feature came in from the q3 implementation IIRC.
It looks like for now the changeWorkingDirectoryTo(...) function only applies to FILESYSTEM_NATIVE, in the function it checks which filesystem is active but when a file is attempted to be opened in an archive the working directory is never applied to it.
So I would have to go through all my meshes and apply a relative path for the image materials in reference to the archives root. (which would be a pain in the butt)