// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#ifdef HAVE_CONFIG_H
+# include <simgear_config.h>
+#endif
+
#include <osg/StateSet>
#include "EffectCullVisitor.hxx"
CullVisitor::apply(node);
return;
}
- Technique* technique = eg->getEffect()->chooseTechnique(&getRenderInfo());
- if (!technique) {
+ Effect* effect = eg->getEffect();
+ Technique* technique = 0;
+ if (!effect) {
CullVisitor::apply(node);
return;
+ } else if (!(technique = effect->chooseTechnique(&getRenderInfo()))) {
+ return;
}
// push the node's state.
osg::StateSet* node_state = node.getStateSet();