From 37e31145347840550f8015ee22ed21c9c81fdc13 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 21 Feb 2007 15:15:55 +0000 Subject: [PATCH] Wojciech Lewandowski: "TexGenNode::TexGenNode( TexGen * texGen ) constructor does not initialize ReferenceFrame. I am not sure maybe this was the intent but first constructor does it so I don't see a reson why third one shouldn't." --- src/osg/State.cpp | 5 +++++ src/osg/TexGenNode.cpp | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) 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;