]> git.mxchange.org Git - simgear.git/blob - simgear/scene/material/parseBlendFunc.hxx
Work around apparent OSG 3.2.0 normal binding bug.
[simgear.git] / simgear / scene / material / parseBlendFunc.hxx
1 ///@file
2 /// Parse osg::BlendFunc from property nodes
3 ///
4 // Copyright (C) 2013  Thomas Geymayer <tomgey@gmail.com>
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Library General Public
8 // License as published by the Free Software Foundation; either
9 // version 2 of the License, or (at your option) any later version.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 // Library General Public License for more details.
15 //
16 // You should have received a copy of the GNU Library General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA
19
20 #ifndef SG_PARSE_BLEND_FUNC_HXX_
21 #define SG_PARSE_BLEND_FUNC_HXX_
22
23 #include <simgear/props/propsfwd.hxx>
24 #include <osg/StateSet>
25
26 namespace simgear
27 {
28
29   /**
30    * Parse a blend function from the given property nodes and apply it to the
31    * given osg::StateSet.
32    *
33    * @param ss          StateState which the blend function will be applied to
34    * @param src
35    * @param dest
36    * @param src_rgb
37    * @param dest_rgb
38    * @param src_alpha
39    * @param dest_alpha
40    */
41   bool parseBlendFunc( osg::StateSet* ss,
42                        const SGPropertyNode* src = 0,
43                        const SGPropertyNode* dest = 0,
44                        const SGPropertyNode* src_rgb = 0,
45                        const SGPropertyNode* dest_rgb = 0,
46                        const SGPropertyNode* src_alpha = 0,
47                        const SGPropertyNode* dest_alpha = 0 );
48
49 } // namespace simgear
50
51
52 #endif /* SG_PARSE_BLEND_FUNC_HXX_ */