Show
Ignore:
Timestamp:
04/08/09 14:32:52 (6 years ago)
Author:
robert
Message:

From Simon Carmody, "Patches for compare and copy of Programs and related state
-Added copying of shaders and attributes in osg::Program copy constructor.
-Changed StateSet::compare function to compare Uniforms and their
override values. Previously it compared a RefUniformPair?."

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osg/StateSet.cpp

    r9354 r9989  
    426426        if      (lhs_uniform_itr->first<rhs_uniform_itr->first) return -1; 
    427427        else if (rhs_uniform_itr->first<lhs_uniform_itr->first) return 1; 
    428         if      (lhs_uniform_itr->second<rhs_uniform_itr->second) return -1; 
    429         else if (rhs_uniform_itr->second<lhs_uniform_itr->second) return 1; 
     428        if      (*lhs_uniform_itr->second.first<*rhs_uniform_itr->second.first) return -1; 
     429        else if (*rhs_uniform_itr->second.first<*lhs_uniform_itr->second.first) return 1; 
     430        if      (lhs_uniform_itr->second.second<rhs_uniform_itr->second.second) return -1; 
     431        else if (rhs_uniform_itr->second.second<lhs_uniform_itr->second.second) return 1; 
    430432        ++lhs_uniform_itr; 
    431433        ++rhs_uniform_itr;