mesh: warn only once about render-to-target not being supported
authorJonathan Neuschäfer <j.neuschaefer@gmx.net>
Wed, 8 Feb 2012 10:49:21 +0000 (11:49 +0100)
committerJonathan Neuschäfer <j.neuschaefer@gmx.net>
Fri, 24 Feb 2012 22:27:01 +0000 (23:27 +0100)
src/mesh.cpp

index 5afb4af592ba7306831212290895eb5523a15a85..d0d8b0a6ed83133b81d8a0648e1c63bb95ab06fb 100644 (file)
@@ -422,8 +422,13 @@ video::ITexture *generateTextureFromMesh(scene::IMesh *mesh,
        video::IVideoDriver *driver = device->getVideoDriver();
        if(driver->queryFeature(video::EVDF_RENDER_TO_TARGET) == false)
        {
-               errorstream<<"generateTextureFromMesh(): EVDF_RENDER_TO_TARGET"
-                               " not supported."<<std::endl;
+               static bool warned = false;
+               if(!warned)
+               {
+                       errorstream<<"generateTextureFromMesh(): EVDF_RENDER_TO_TARGET"
+                                       " not supported."<<std::endl;
+                       warned = true;
+               }
                return NULL;
        }