1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Completely generalized mesh generation; ContentFeatures serialization

This commit is contained in:
Perttu Ahola 2011-11-15 19:58:36 +02:00
parent 89e7bacd99
commit eed727c61b
18 changed files with 795 additions and 821 deletions

View file

@ -182,12 +182,15 @@ struct SourceAtlasPointer
class SourceImageCache
{
public:
void insert(const std::string &name, video::IImage *img)
void insert(const std::string &name, video::IImage *img,
bool do_overwrite)
{
assert(img);
core::map<std::string, video::IImage*>::Node *n;
n = m_images.find(name);
if(n){
if(!do_overwrite)
return;
video::IImage *oldimg = n->getValue();
if(oldimg)
oldimg->drop();
@ -720,7 +723,7 @@ void TextureSource::insertSourceImage(const std::string &name, video::IImage *im
assert(get_current_thread_id() == m_main_thread);
m_sourcecache.insert(name, img);
m_sourcecache.insert(name, img, false);
#if 0
JMutexAutoLock lock(m_atlaspointer_cache_mutex);