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

@ -421,9 +421,14 @@ video::ITexture *generateTextureFromMesh(scene::IMesh *mesh,
{ {
video::IVideoDriver *driver = device->getVideoDriver(); video::IVideoDriver *driver = device->getVideoDriver();
if(driver->queryFeature(video::EVDF_RENDER_TO_TARGET) == false) if(driver->queryFeature(video::EVDF_RENDER_TO_TARGET) == false)
{
static bool warned = false;
if(!warned)
{ {
errorstream<<"generateTextureFromMesh(): EVDF_RENDER_TO_TARGET" errorstream<<"generateTextureFromMesh(): EVDF_RENDER_TO_TARGET"
" not supported."<<std::endl; " not supported."<<std::endl;
warned = true;
}
return NULL; return NULL;
} }