Closed ghost closed 7 years ago
Doh, and this belongs in ResourceManager.cpp of course. I'm having major brain farts today.
@Swartz27 First of all, I'm not sure that CTexture::Load is thread safe. And also I don't see any of threads synchronization mechanism actually you should use. Afaik, Lost Alpha is based on SoC version of xray, so we have no any guarantees that code from there should work properly on CoP.
@Im-dex You're right, I don't know if it's thread safe. In terms of the code, their rendering system is the same as COP, they ported the whole rendering system. Anyway, feel free to discard then.
I forgot to mention: this was tested on the regular COP source code by the creator and it did work, so it works for COP, but since you refactored the way ResourceManager.cpp is we don't know how to get it working. But again, I totally get it if you don't want to use it.
This code is invalid due to lack of synchronization. Maybe you are missing something?
Может я просто с Рафой свяжусь да он сам сюда зайдет да объяснит?
Вставлю свое скромное слово: Почему бы и нет? Будет гораздо лучше, если он сам всё и объяснит.
Хатаб. Он в целом сказал, что был прирост в скорости загрузки и данный код работал на ванильном ЗП. Суть тут в независимых друг от друга потоках.
Спасибо) Видимо, в независимости их и кроется опасность)
Provided by RafaRafa of the Lost Alpha team. The problem is neither of us can get it to work with your code base properly, hence why I didn't do a pull request.
Here is his code for Lost Alpha: //tatarinrafa:Multithreaded texture loading
Edit Damnit, code thingy broke. But you get the idea.