Moved the body of the FBOExtensions::instance() to the .cpp and added bool to

control whether that an FBOExtensions structure can be created if missing.
This commit is contained in:
Robert Osfield
2006-01-03 10:44:14 +00:00
parent 4167bc3673
commit ab71114219
3 changed files with 14 additions and 17 deletions

View File

@@ -91,7 +91,7 @@ namespace osg
* FBOExtensions
**************************************************************************/
class OSG_EXPORT FBOExtensions
class OSG_EXPORT FBOExtensions : public osg::Referenced
{
public:
typedef void APIENTRY TglBindRenderbufferEXT(GLenum, GLuint);
@@ -122,17 +122,7 @@ namespace osg
TglFramebufferRenderbufferEXT* glFramebufferRenderbufferEXT;
TglGenerateMipmapEXT* glGenerateMipmapEXT;
static FBOExtensions* instance(unsigned contextID)
{
static buffered_object<FBOExtensions *> _instances;
FBOExtensions *ext = _instances[contextID];
if (!ext)
{
ext = new FBOExtensions(contextID);
_instances[contextID] = ext;
}
return ext;
}
static FBOExtensions* instance(unsigned contextID, bool createIfNotInitalized);
bool isSupported() const { return _supported; }