Don't enable AVIWriter if PBO is not usable

This commit is contained in:
Benau 2017-03-18 16:06:38 +08:00
parent 8259026ac1
commit 88cbcd202c
2 changed files with 5 additions and 1 deletions

View File

@ -1896,11 +1896,15 @@ void IrrDriver::update(float dt)
// ----------------------------------------------------------------------------
void IrrDriver::setRecording(bool val)
{
#ifndef SERVER_ONLY
if (!CVS->isARBPixelBufferObjectUsable())
return;
if (val == false && m_recording == false)
return;
m_recording = val;
if (val == false)
AVIWriter::getInstance()->stopRecording();
#endif
} // setRecording
// ----------------------------------------------------------------------------

View File

@ -575,4 +575,4 @@ public:
extern IrrDriver *irr_driver;
#endif // HEADER_IRR_DRIVER_HPP
#endif // HEADER_IRR_DRIVER_HPP