root/OpenSceneGraph/trunk/src/osgWrappers/deprecated-dotosg/osg/TexEnvFilter.cpp @ 13041

Revision 13041, 1.2 kB (checked in by robert, 2 years ago)

Ran script to remove trailing spaces and tabs

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1#include "osg/TexEnvFilter"
2
3#include "osgDB/Registry"
4#include "osgDB/Input"
5#include "osgDB/Output"
6
7using namespace osg;
8using namespace osgDB;
9
10// forward declare functions to use later.
11bool TexEnvFilter_readLocalData(Object& obj, Input& fr);
12bool TexEnvFilter_writeLocalData(const Object& obj, Output& fw);
13
14// register the read and write functions with the osgDB::Registry.
15REGISTER_DOTOSGWRAPPER(TexEnvFilter)
16(
17    new TexEnvFilter,
18    "TexEnvFilter",
19    "Object StateAttribute TexEnvFilter",
20    &TexEnvFilter_readLocalData,
21    &TexEnvFilter_writeLocalData
22);
23
24
25bool TexEnvFilter_readLocalData(Object& obj, Input& fr)
26{
27    bool iteratorAdvanced = false;
28
29    TexEnvFilter& texenvfilter = static_cast<TexEnvFilter&>(obj);
30
31    float lodBias = 0.0f;
32    if (fr[0].matchWord("lodBias") && fr[1].getFloat(lodBias))
33    {
34        fr += 2;
35        texenvfilter.setLodBias(lodBias);
36        iteratorAdvanced = true;
37    }
38
39    return iteratorAdvanced;
40}
41
42bool TexEnvFilter_writeLocalData(const Object& obj, Output& fw)
43{
44    const TexEnvFilter& texenvfilter = static_cast<const TexEnvFilter&>(obj);
45
46    fw.indent() << "lodBias " << texenvfilter.getLodBias() << std::endl;
47
48    return true;
49}
Note: See TracBrowser for help on using the browser.