mesh: warn only once about render-to-target not being supported

This commit is contained in:
Jonathan Neuschäfer 2012-02-08 11:49:21 +01:00
parent ff678d1607
commit 3a89c40e26

@ -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;
}