TerraForge3D  2.3.1
3D Terrain And Landscape Generator

◆ LoadTextureThumbs()

void TextureStore::LoadTextureThumbs ( )
private

Definition at line 205 of file TextureStore.cpp.

206{
207 Log("Loading texture thumbnails");
208 int i=0;
209
210 for(auto &it : textureStoreItems)
211 {
212 i++;
213
214 if(!FileExists(GetExecutableDir() + PATH_SEPARATOR "Data" PATH_SEPARATOR "cache" PATH_SEPARATOR "texture_thumbnails" PATH_SEPARATOR + it.name + ".png"))
215 {
216 Log("Thumbnail for texture: " + it.name + " not found.");
217 it.texThumbnail = new Texture2D(GetExecutableDir() + PATH_SEPARATOR
218 "Data" PATH_SEPARATOR "textures" PATH_SEPARATOR
219 "white.png", false);
220 }
221
222 else
223 {
224 it.texThumbnail = new Texture2D(it.thumbnailPath, false);
225 }
226
227 if(i % 20 == 0)
228 {
229 std::cout << ("Loaded " + std::to_string(i) + " of " + std::to_string(textureStoreItems.size()) + " texture thumbnails\r");
230 }
231 }
232
233 Log("Texture thumbnails loaded");
234}