]> git.mxchange.org Git - simgear.git/blob - simgear/scene/material/Pass.cxx
Effects framework
[simgear.git] / simgear / scene / material / Pass.cxx
1 #include "Pass.hxx"
2
3 #include <simgear/structure/OSGUtils.hxx>
4
5 #include <osg/StateSet>
6
7 namespace simgear
8 {
9
10 Pass::Pass(const Pass& rhs, const osg::CopyOp& copyop) :
11     _stateSet(clone_ref(rhs._stateSet, copyop))
12 {
13 }
14
15 void Pass::resizeGLObjectBuffers(unsigned int maxSize)
16 {
17     if (_stateSet.valid())
18         _stateSet->resizeGLObjectBuffers(maxSize);
19 }
20
21 void Pass::releaseGLObjects(osg::State* state) const
22 {
23     if (_stateSet.valid())
24         _stateSet->releaseGLObjects(state);
25 }
26
27 }