~ubuntu-branches/debian/experimental/openscenegraph/experimental

« back to all changes in this revision

Viewing changes to OpenSceneGraph/src/osg/StateAttribute.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Alberto Luaces
  • Date: 2011-01-29 11:36:29 UTC
  • mfrom: (1.1.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20110129113629-qisrm2kdqlurc7t3
Tags: 2.9.11-1
* Removed bug-555869-ftbfs_with_binutils_gold.dpatch since upstream has
  already taken care of the issue.
* Removed bug-528229.dpatch since the pkgconfig files are now also split
  in upstream.
* Removed explicit dependency on GLU.
* Upstream no longer includes osgIntrospection (Closes: #592420).
* Disabled zip plugin as its implementation stores an embedded copy of
  zlib.
* Enabled Qt support. Thanks James Goppert.
* Enabled SVG and PDF plugins. Thanks James Goppert.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 
2
2
 *
3
3
 * This application is open source and may be redistributed and/or modified   
4
 
 * freely and without restriction, both in commericial and non commericial
 
4
 * freely and without restriction, both in commercial and non commercial
5
5
 * applications, as long as this copyright notice is maintained.
6
6
 * 
7
7
 * This application is distributed in the hope that it will be useful,
18
18
 
19
19
using namespace osg;
20
20
 
21
 
 
22
21
StateAttribute::StateAttribute()
23
22
    :Object(true)
24
23
{
27
26
 
28
27
void StateAttribute::addParent(osg::StateSet* object)
29
28
{
30
 
    osg::notify(osg::DEBUG_FP)<<"Adding parent"<<getRefMutex()<<std::endl;
 
29
    OSG_DEBUG_FP<<"Adding parent"<<getRefMutex()<<std::endl;
31
30
    OpenThreads::ScopedPointerLock<OpenThreads::Mutex> lock(getRefMutex());
32
31
    
33
32
    _parents.push_back(object);
44
43
 
45
44
void StateAttribute::setUpdateCallback(StateAttributeCallback* uc)
46
45
{
47
 
    osg::notify(osg::INFO)<<"StateAttribute::Setting Update callbacks"<<std::endl;
 
46
    OSG_INFO<<"StateAttribute::Setting Update callbacks"<<std::endl;
48
47
 
49
48
    if (_updateCallback==uc) return;
50
49
    
56
55
    
57
56
    if (delta!=0)
58
57
    {
59
 
        osg::notify(osg::INFO)<<"Going to set StateAttribute parents"<<std::endl;
 
58
        OSG_INFO<<"Going to set StateAttribute parents"<<std::endl;
60
59
 
61
60
        for(ParentList::iterator itr=_parents.begin();
62
61
            itr!=_parents.end();
63
62
            ++itr)
64
63
        {
65
 
            osg::notify(osg::INFO)<<"   Setting StateAttribute parent"<<std::endl;
 
64
            OSG_INFO<<"   Setting StateAttribute parent"<<std::endl;
66
65
 
67
66
            (*itr)->setNumChildrenRequiringUpdateTraversal((*itr)->getNumChildrenRequiringUpdateTraversal()+delta);
68
67
        }
71
70
 
72
71
void StateAttribute::setEventCallback(StateAttributeCallback* ec)
73
72
{
74
 
    osg::notify(osg::INFO)<<"StateAttribute::Setting Event callbacks"<<std::endl;
 
73
    OSG_INFO<<"StateAttribute::Setting Event callbacks"<<std::endl;
75
74
 
76
75
    if (_eventCallback==ec) return;
77
76