Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 831 vs 832 for /trunk/Source Code/Platform/Video/Textures/Texture.cpp

Diff revisions: vs.
  @@ -12,7 +12,6 @@
12 12 static const U16 g_partitionSize = 128;
13 13 };
14 14
15 - const char* Texture::s_defaultTextureFilePath = nullptr;
16 15 const char* Texture::s_missingTextureFileName = nullptr;
17 16
18 17 Texture::Texture(GFXDevice& context,
  @@ -72,7 +71,7 @@
72 71 Util::Trim(currentTextureFile);
73 72 // Skip invalid entries
74 73 if (!currentTextureFile.empty()) {
75 - currentTextureFullPath = (currentTextureLocation.empty() ? s_defaultTextureFilePath
74 + currentTextureFullPath = (currentTextureLocation.empty() ? Paths::g_texturesLocation
76 75 : currentTextureLocation) +
77 76 "/" +
78 77 currentTextureFile;
  @@ -132,11 +131,15 @@
132 131
133 132 // Validate data
134 133 if (!img.data()) {
134 + if (info._layerIndex > 0) {
135 + Console::errorfn(Locale::get(_ID("ERROR_TEXTURE_LAYER_LOAD")), name.c_str());
136 + return false;
137 + }
135 138 Console::errorfn(Locale::get(_ID("ERROR_TEXTURE_LOAD")), name.c_str());
136 139 // Missing texture fallback.
137 140 img.flip(false);
138 141 // missing_texture.jpg must be something that really stands out
139 - ImageTools::ImageDataInterface::CreateImageData(Util::StringFormat("%s/%s", s_defaultTextureFilePath, s_missingTextureFileName).c_str(), img);
142 + ImageTools::ImageDataInterface::CreateImageData(Paths::g_assetsLocation + Paths::g_texturesLocation + s_missingTextureFileName, img);
140 143
141 144 }
142 145