diff options
Diffstat (limited to 'src/tile.cpp')
-rw-r--r-- | src/tile.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/tile.cpp b/src/tile.cpp index b8080c708..78aa4d946 100644 --- a/src/tile.cpp +++ b/src/tile.cpp @@ -730,9 +730,6 @@ u32 TextureSource::getTextureIdDirect(const std::string &name) m_textureinfo_cache.push_back(ti); m_name_to_id[name] = id; - /*infostream<<"getTextureIdDirect(): " - <<"Returning id="<<id<<" for name \""<<name<<"\""<<std::endl;*/ - return id; } @@ -962,6 +959,20 @@ bool TextureSource::generateImage(std::string part_of_name, video::IImage *& bas { video::IImage *image = m_sourcecache.getOrLoad(part_of_name, m_device); + if (image != NULL) { + if (!driver->queryFeature(irr::video::EVDF_TEXTURE_NPOT)) { + core::dimension2d<u32> dim = image->getDimension(); + + + if ((dim.Height %2 != 0) || + (dim.Width %2 != 0)) { + errorstream << "TextureSource::generateImage " + << part_of_name << " size npot2 x=" << dim.Width + << " y=" << dim.Height << std::endl; + } + } + } + if(image == NULL) { if(part_of_name != ""){ |