diff --git a/src/osg/FrameBufferObject.cpp b/src/osg/FrameBufferObject.cpp index 4c9eeea6d..38d7f5c8d 100644 --- a/src/osg/FrameBufferObject.cpp +++ b/src/osg/FrameBufferObject.cpp @@ -403,6 +403,10 @@ void FrameBufferObject::apply(State &state) const if (_unsupported[contextID]) return; + + + state.checkGLErrors("A"); + FBOExtensions* ext = FBOExtensions::instance(contextID); if (!ext->isSupported()) { @@ -417,6 +421,8 @@ void FrameBufferObject::apply(State &state) const return; } + state.checkGLErrors("B"); + int &dirtyAttachmentList = _dirtyAttachmentList[contextID]; GLuint &fboID = _fboID[contextID]; @@ -433,6 +439,8 @@ void FrameBufferObject::apply(State &state) const } + state.checkGLErrors("C"); + if (dirtyAttachmentList) { // create textures and mipmaps before we bind the frame buffer object @@ -444,8 +452,12 @@ void FrameBufferObject::apply(State &state) const } + state.checkGLErrors("D"); + ext->glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fboID); + state.checkGLErrors("E"); + if (dirtyAttachmentList) { for (AttachmentMap::const_iterator i=_attachments.begin(); i!=_attachments.end(); ++i) @@ -455,6 +467,7 @@ void FrameBufferObject::apply(State &state) const } dirtyAttachmentList = 0; } + state.checkGLErrors("F"); } int FrameBufferObject::compare(const StateAttribute &sa) const diff --git a/src/osgPlugins/flt/GroupRecord.cpp b/src/osgPlugins/flt/GroupRecord.cpp index 5aa1567f5..63410cb6f 100644 --- a/src/osgPlugins/flt/GroupRecord.cpp +++ b/src/osgPlugins/flt/GroupRecord.cpp @@ -12,7 +12,7 @@ using namespace flt; // //////////////////////////////////////////////////////////////////// -RegisterRecordProxy g_GroupProxy; +RegisterRecordProxy g_fltGroupProxy; GroupRecord::GroupRecord() { diff --git a/src/osgPlugins/flt/ObjectRecord.cpp b/src/osgPlugins/flt/ObjectRecord.cpp index ad55fc3f6..933ada2d8 100644 --- a/src/osgPlugins/flt/ObjectRecord.cpp +++ b/src/osgPlugins/flt/ObjectRecord.cpp @@ -12,7 +12,7 @@ using namespace flt; // //////////////////////////////////////////////////////////////////// -RegisterRecordProxy g_ObjectProxy; +RegisterRecordProxy g_fltObjectProxy; ObjectRecord::ObjectRecord() { diff --git a/src/osgPlugins/flt/SwitchRecord.cpp b/src/osgPlugins/flt/SwitchRecord.cpp index ff1f1e01d..6e3271c0b 100644 --- a/src/osgPlugins/flt/SwitchRecord.cpp +++ b/src/osgPlugins/flt/SwitchRecord.cpp @@ -12,7 +12,7 @@ using namespace flt; // //////////////////////////////////////////////////////////////////// -RegisterRecordProxy g_SwitchProxy; +RegisterRecordProxy g_fltSwitchProxy; SwitchRecord::SwitchRecord() { diff --git a/src/osgPlugins/osgSim/IO_MultiSwitch.cpp b/src/osgPlugins/osgSim/IO_MultiSwitch.cpp index 7af34df99..9764bc4e3 100644 --- a/src/osgPlugins/osgSim/IO_MultiSwitch.cpp +++ b/src/osgPlugins/osgSim/IO_MultiSwitch.cpp @@ -13,7 +13,7 @@ bool MultiSwitch_readLocalData(Object& obj, Input& fr); bool MultiSwitch_writeLocalData(const Object& obj, Output& fw); // register the read and write functions with the osgDB::Registry. -RegisterDotOsgWrapperProxy g_SwitchProxy +RegisterDotOsgWrapperProxy g_simSwitchProxy ( new osgSim::MultiSwitch, "MultiSwitch", diff --git a/src/osgPlugins/rot/ReaderWriterROT.cpp b/src/osgPlugins/rot/ReaderWriterROT.cpp index 00b3a1205..75e312198 100644 --- a/src/osgPlugins/rot/ReaderWriterROT.cpp +++ b/src/osgPlugins/rot/ReaderWriterROT.cpp @@ -29,7 +29,7 @@ #define EXTENSION_NAME "rot" -bool getFilenameAndParams(const std::string& input, std::string& filename, std::string& params) +static bool getFilenameAndParams(const std::string& input, std::string& filename, std::string& params) { // find the start of the params list, accounting for nesting of [] and () brackets, // note, we are working backwards. diff --git a/src/osgPlugins/scale/ReaderWriterSCALE.cpp b/src/osgPlugins/scale/ReaderWriterSCALE.cpp index 843bf773c..04d24b611 100644 --- a/src/osgPlugins/scale/ReaderWriterSCALE.cpp +++ b/src/osgPlugins/scale/ReaderWriterSCALE.cpp @@ -30,7 +30,7 @@ #define EXTENSION_NAME "scale" -bool getFilenameAndParams(const std::string& input, std::string& filename, std::string& params) +static bool getFilenameAndParams(const std::string& input, std::string& filename, std::string& params) { // find the start of the params list, accounting for nesting of [] and () brackets, // note, we are working backwards. diff --git a/src/osgPlugins/trans/ReaderWriterTRANS.cpp b/src/osgPlugins/trans/ReaderWriterTRANS.cpp index 8a18d9422..d06a7873f 100644 --- a/src/osgPlugins/trans/ReaderWriterTRANS.cpp +++ b/src/osgPlugins/trans/ReaderWriterTRANS.cpp @@ -30,7 +30,7 @@ #define EXTENSION_NAME "trans" -bool getFilenameAndParams(const std::string& input, std::string& filename, std::string& params) +static bool getFilenameAndParams(const std::string& input, std::string& filename, std::string& params) { // find the start of the params list, accounting for nesting of [] and () brackets, // note, we are working backwards.