diff --git a/Source/Core/Loader/ERS_ModelLoader/ERS_CLASS_AsyncTextureUpdater.cpp b/Source/Core/Loader/ERS_ModelLoader/ERS_CLASS_AsyncTextureUpdater.cpp index 4dcfcc0be2..39d89603c0 100644 --- a/Source/Core/Loader/ERS_ModelLoader/ERS_CLASS_AsyncTextureUpdater.cpp +++ b/Source/Core/Loader/ERS_ModelLoader/ERS_CLASS_AsyncTextureUpdater.cpp @@ -372,7 +372,7 @@ void ERS_CLASS_AsyncTextureUpdater::SetLevelRAM(ERS_STRUCT_Model* Model, bool Lo // Also apparenly I don't know how to spell... // Load New Levels Into Memory if (Model->TextureLevelInRAM_ < Model->TargetTextureLevelRAM) { - for (int LevelToLoad = Model->TextureLevelInRAM_; LevelToLoad <= Model->TargetTextureLevelRAM; LevelToLoad++) { + for (int LevelToLoad = std::max(Model->TextureLevelInRAM_, 0); LevelToLoad <= Model->TargetTextureLevelRAM; LevelToLoad++) { for (unsigned int TextureIndex = 0; TextureIndex < Model->Textures_.size(); TextureIndex++) { LoadImageDataRAM(&Model->Textures_[TextureIndex], LevelToLoad, LogEnable); } @@ -623,7 +623,6 @@ void ERS_CLASS_AsyncTextureUpdater::SortModels(ERS_STRUCT_Scene* Scene) { } - void ERS_CLASS_AsyncTextureUpdater::TexturePusherThread(int Index) { // Name Thread @@ -724,24 +723,18 @@ void ERS_CLASS_AsyncTextureUpdater::TextureLoaderThread(int Index) { // Shut Down FreeImage FreeImage_DeInitialise(); } - - int ERS_CLASS_AsyncTextureUpdater::GetNumLoaderThreads() { return NumLoaderThreads_; } - int ERS_CLASS_AsyncTextureUpdater::GetNumStreamerThreads() { return NumPusherThreads_; } - void ERS_CLASS_AsyncTextureUpdater::SetNumLoaderThreads(int NumThreads) { NumLoaderThreads_ = NumThreads; } - void ERS_CLASS_AsyncTextureUpdater::SetNumStreamerThreads(int NumThreads) { NumPusherThreads_ = NumThreads; } - void ERS_CLASS_AsyncTextureUpdater::SetupPusherThreads() { // Setup Threads