diff --git a/src/osg/State.cpp b/src/osg/State.cpp index b26cbca65..5e5d91f01 100644 --- a/src/osg/State.cpp +++ b/src/osg/State.cpp @@ -29,7 +29,12 @@ State::State() _modelView = _identity; _abortRenderingPtr = false; + +#if 1 _checkGLErrors = ONCE_PER_FRAME; +#else + _checkGLErrors = ONCE_PER_ATTRIBUTE; +#endif _currentActiveTextureUnit=0; _currentClientActiveTextureUnit=0; diff --git a/src/osg/TexGenNode.cpp b/src/osg/TexGenNode.cpp index 05c4ee4bf..f1c62e645 100644 --- a/src/osg/TexGenNode.cpp +++ b/src/osg/TexGenNode.cpp @@ -35,8 +35,12 @@ TexGenNode::TexGenNode(const TexGenNode& cn, const CopyOp& copyop): { } -TexGenNode::TexGenNode(TexGen *texgen) +TexGenNode::TexGenNode(TexGen *texgen): + _referenceFrame(RELATIVE_RF) { + // switch off culling of tex gen nodes by default. + setCullingActive(false); + _textureUnit = 0; _value = StateAttribute::ON; _stateset = new StateSet;