|
 |
|
Storage Manager case handling broken? |
« View previous topic :: View next topic » |
Author |
Message
|
cmusch |
Posted: Thu Aug 02, 2007 8:29 pm Post subject: Storage Manager case handling broken? |
|
|
Joined: 02 Aug 2007 Posts: 33
|
Hello!
I have an issue here with uppercase texture names. I'm currently writing a storage plugin for meshes. I want to load a texture to fill into the surface description structure. My code is like this:
Code: |
iStorage * tex_storage = g_storage_man->GetStorageFromPath(tex_path);
for (unsigned i=0; i<tex_storage->GetNodesNo(); ++i)
{
sStorageNodeInfo info;
tex_storage->GetNodeInfo(i, &info);
msgBox(info.node_name);
}
iTexture * tex = (iTexture*)tex_storage->ExtractNode(cur_mesh->getTextureName()[0].c_str());
if (!tex) msgBox(std::string("Couldn't find tex ") + cur_mesh->getTextureName()[0]);
|
A texture with uppercase letters can't be found in the storage. Its name in lowercase is displayed in a messagebox when the textures contained in the storage are listed, so i suppose names are converted to lowercase internally? Using lowercase names in the model solves this problem. |
|
Back to top |
|
 |
ALicu |
Posted: Fri Aug 03, 2007 7:20 am Post subject: |
|
|
Joined: 12 Feb 2007 Posts: 1327
|
Yes, you are right. Because Windows OS is not case sensitive regarding the file system, all the file names are transformed to lower case when parsed by the engine. This at least ensures that you always find the image by its lower case name. The file system may change the name as he likes when copying the file for example (I know Windows 2000 and above don't do that, but previous systems used to that, and also the user can change the files to any case and the file basically should remain the same).
I'm sorry if this was not indicated in the documentation, I will have it fixed.
Regards,
Adrian L. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|