Added GL2Extensions::isDrawBuffersSupported() and usage with FrameBufferObject.cpp to prevent invalid MRT usage causing crash under GLES2

This commit is contained in:
Robert Osfield
2013-07-24 13:01:38 +00:00
parent 94dcfb4ec2
commit a844a278ab
2 changed files with 8 additions and 2 deletions

View File

@@ -530,6 +530,8 @@ class OSG_EXPORT GL2Extensions : public osg::Referenced
void setShaderAtomicCounterSupported(bool flag) { _isShaderAtomicCountersSupported = flag; }
bool isShaderAtomicCounterSupported() const {return _isShaderAtomicCountersSupported; }
bool isDrawBuffersSupported() const { return _glDrawBuffers!=0; }
/** Function to call to get the extension of a specified context.
* If the Exentsion object for that context has not yet been created then
* and the 'createIfNotInitalized' flag been set to false then returns NULL.