]> git.tdb.fi Git - libs/gl.git/blobdiff - source/object.cpp
Properly handle the case where an object doesn't have a main texture but its techniqu...
[libs/gl.git] / source / object.cpp
index b53a3f0802767e9e6e80b7a6e1d0434aa4d0c474..2026e3d58f3d0b658ed4b3bdba7fe9d211d6ffd1 100644 (file)
@@ -132,6 +132,8 @@ Object::Loader::Loader(Object &o, Collection &c):
 
 void Object::Loader::finish()
 {
+       if(obj.technique && !obj.main_texture)
+               obj.main_texture=obj.technique->get_main_texture();
        for(unsigned i=0; i<obj.textures.size(); ++i)
        {
                if(!obj.textures[i])