1 // Copyright (C) 2008 Timothy Moore timoore@redhat.com
3 // This program is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU General Public License as
5 // published by the Free Software Foundation; either version 2 of the
6 // License, or (at your option) any later version.
8 // This program is distributed in the hope that it will be useful, but
9 // WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // General Public License for more details.
13 // You should have received a copy of the GNU General Public License
14 // along with this program; if not, write to the Free Software
15 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 # include <simgear_config.h>
21 #include "EffectGeode.hxx"
23 #include "Technique.hxx"
25 #include <osgUtil/CullVisitor>
27 #include <osgDB/Registry>
28 #include <osgDB/Input>
29 #include <osgDB/ParameterOutput>
35 using namespace osgUtil;
37 EffectGeode::EffectGeode()
41 EffectGeode::EffectGeode(const EffectGeode& rhs, const CopyOp& copyop) :
44 _effect = static_cast<Effect*>(rhs._effect->clone(copyop));
47 void EffectGeode::resizeGLObjectBuffers(unsigned int maxSize)
50 _effect->resizeGLObjectBuffers(maxSize);
51 Geode::resizeGLObjectBuffers(maxSize);
54 void EffectGeode::releaseGLObjects(osg::State* state) const
57 _effect->releaseGLObjects(state);
58 Geode::releaseGLObjects(state);
61 bool EffectGeode_writeLocalData(const Object& obj, osgDB::Output& fw)
63 const EffectGeode& eg = static_cast<const EffectGeode&>(obj);
65 fw.indent() << "effect\n";
66 fw.writeObject(*eg.getEffect());
72 osgDB::RegisterDotOsgWrapperProxy effectGeodeProxy
75 "simgear::EffectGeode",
76 "Object Node Geode simgear::EffectGeode",
78 &EffectGeode_writeLocalData