]> git.mxchange.org Git - simgear.git/blob - simgear/scene/material/Effect.hxx
Use Effects in materials library, and therefore in scenery
[simgear.git] / simgear / scene / material / Effect.hxx
1 // Copyright (C) 2008  Timothy Moore timoore@redhat.com
2 //
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.
7 //
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.
12 //
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.
16
17
18 #ifndef SIMGEAR_EFFECT_HXX
19 #define SIMGEAR_EFFECT_HXX 1
20
21 #include <vector>
22
23 #include <osg/Object>
24
25 namespace osg
26 {
27 class Drawable;
28 class StateSet;
29 class RenderInfo;
30 }
31
32 namespace osgUtil
33 {
34 class CullVisitor;
35 }
36
37 namespace simgear
38 {
39 class Technique;
40
41 class Effect : public osg::Object
42 {
43 public:
44     META_Object(simgear,Effect)
45     Effect();
46     Effect(const Effect& rhs,
47            const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
48     osg::StateSet* getDefaultStateSet();
49     std::vector<osg::ref_ptr<Technique> > techniques;
50     Technique* chooseTechnique(osg::RenderInfo* renderInfo);
51     virtual void resizeGLObjectBuffers(unsigned int maxSize);
52     virtual void releaseGLObjects(osg::State* state = 0) const;
53 protected:
54     ~Effect();
55 };
56 }
57 #endif