Show
Ignore:
Timestamp:
07/24/14 16:14:35 (4 days ago)
Author:
robert
Message:

Added support for changing background colour of LineEdit? widget when focus changes

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/examples/osggeometry/osggeometry.cpp

    r13521 r13522  
    122122        // pass the color array to points geometry, note the binding to tell the geometry 
    123123        // that only use one color for the whole object. 
    124         pointsGeom->setColorArray(colors); 
    125         pointsGeom->setColorBinding(osg::Geometry::BIND_OVERALL); 
     124        pointsGeom->setColorArray(colors, osg::Array::BIND_OVERALL); 
    126125 
    127126 
     
    129128        osg::Vec3Array* normals = new osg::Vec3Array; 
    130129        normals->push_back(osg::Vec3(0.0f,-1.0f,0.0f)); 
    131         pointsGeom->setNormalArray(normals); 
    132         pointsGeom->setNormalBinding(osg::Geometry::BIND_OVERALL); 
     130        pointsGeom->setNormalArray(normals, osg::Array::BIND_OVERALL); 
    133131 
    134132 
     
    170168        osg::Vec4Array* colors = new osg::Vec4Array; 
    171169        colors->push_back(osg::Vec4(1.0f,1.0f,0.0f,1.0f)); 
    172         linesGeom->setColorArray(colors); 
    173         linesGeom->setColorBinding(osg::Geometry::BIND_OVERALL); 
     170        linesGeom->setColorArray(colors, osg::Array::BIND_OVERALL); 
    174171 
    175172 
     
    177174        osg::Vec3Array* normals = new osg::Vec3Array; 
    178175        normals->push_back(osg::Vec3(0.0f,-1.0f,0.0f)); 
    179         linesGeom->setNormalArray(normals); 
    180         linesGeom->setNormalBinding(osg::Geometry::BIND_OVERALL); 
     176        linesGeom->setNormalArray(normals, osg::Array::BIND_OVERALL); 
    181177 
    182178 
     
    212208        osg::Vec4Array* colors = new osg::Vec4Array; 
    213209        colors->push_back(osg::Vec4(1.0f,1.0f,0.0f,1.0f)); 
    214         linesGeom->setColorArray(colors); 
    215         linesGeom->setColorBinding(osg::Geometry::BIND_OVERALL); 
     210        linesGeom->setColorArray(colors, osg::Array::BIND_OVERALL); 
    216211 
    217212 
     
    219214        osg::Vec3Array* normals = new osg::Vec3Array; 
    220215        normals->push_back(osg::Vec3(0.0f,-1.0f,0.0f)); 
    221         linesGeom->setNormalArray(normals); 
    222         linesGeom->setNormalBinding(osg::Geometry::BIND_OVERALL); 
     216        linesGeom->setNormalArray(normals, osg::Array::BIND_OVERALL); 
    223217 
    224218 
     
    259253        osg::Vec4Array* colors = new osg::Vec4Array; 
    260254        colors->push_back(osg::Vec4(1.0f,1.0f,0.0f,1.0f)); 
    261         linesGeom->setColorArray(colors); 
    262         linesGeom->setColorBinding(osg::Geometry::BIND_OVERALL); 
     255        linesGeom->setColorArray(colors, osg::Array::BIND_OVERALL); 
    263256 
    264257 
     
    266259        osg::Vec3Array* normals = new osg::Vec3Array; 
    267260        normals->push_back(osg::Vec3(0.0f,-1.0f,0.0f)); 
    268         linesGeom->setNormalArray(normals); 
    269         linesGeom->setNormalBinding(osg::Geometry::BIND_OVERALL); 
     261        linesGeom->setNormalArray(normals, osg::Array::BIND_OVERALL); 
    270262 
    271263 
     
    333325 
    334326        // use the shared color array. 
    335         polyGeom->setColorArray(shared_colors.get()); 
    336         polyGeom->setColorBinding(osg::Geometry::BIND_OVERALL); 
     327        polyGeom->setColorArray(shared_colors.get(), osg::Array::BIND_OVERALL); 
    337328 
    338329 
    339330        // use the shared normal array. 
    340         polyGeom->setNormalArray(shared_normals.get()); 
    341         polyGeom->setNormalBinding(osg::Geometry::BIND_OVERALL); 
     331        polyGeom->setNormalArray(shared_normals.get(), osg::Array::BIND_OVERALL); 
    342332 
    343333 
     
    380370 
    381371        // use the shared color array. 
    382         polyGeom->setColorArray(shared_colors.get()); 
    383         polyGeom->setColorBinding(osg::Geometry::BIND_OVERALL); 
     372        polyGeom->setColorArray(shared_colors.get(), osg::Array::BIND_OVERALL); 
    384373 
    385374 
    386375        // use the shared normal array. 
    387         polyGeom->setNormalArray(shared_normals.get()); 
    388         polyGeom->setNormalBinding(osg::Geometry::BIND_OVERALL); 
     376        polyGeom->setNormalArray(shared_normals.get(), osg::Array::BIND_OVERALL); 
    389377 
    390378 
     
    429417 
    430418        // use the shared color array. 
    431         polyGeom->setColorArray(shared_colors.get()); 
    432         polyGeom->setColorBinding(osg::Geometry::BIND_OVERALL); 
     419        polyGeom->setColorArray(shared_colors.get(), osg::Array::BIND_OVERALL); 
    433420 
    434421 
    435422        // use the shared normal array. 
    436         polyGeom->setNormalArray(shared_normals.get()); 
    437         polyGeom->setNormalBinding(osg::Geometry::BIND_OVERALL); 
     423        polyGeom->setNormalArray(shared_normals.get(), osg::Array::BIND_OVERALL); 
    438424 
    439425 
     
    497483 
    498484        // use the shared color array. 
    499         polyGeom->setColorArray(shared_colors.get()); 
    500         polyGeom->setColorBinding(osg::Geometry::BIND_OVERALL); 
     485        polyGeom->setColorArray(shared_colors.get(), osg::Array::BIND_OVERALL); 
    501486 
    502487 
    503488        // use the shared normal array. 
    504         polyGeom->setNormalArray(shared_normals.get()); 
    505         polyGeom->setNormalBinding(osg::Geometry::BIND_OVERALL); 
     489        polyGeom->setNormalArray(shared_normals.get(), osg::Array::BIND_OVERALL); 
    506490 
    507491