Changeset 13470

Show
Ignore:
Timestamp:
10/21/14 10:27:28 (less than one hour ago)
Author:
robert
Message:

Removed checks against Drawable as these are no longer required.

Location:
OpenSceneGraph/trunk
Files:
2 added
2 modified

Legend:

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

    r12529 r13470  
    1818 
    1919#include <osg/Geode> 
    20 #include <osg/Geometry> 
     20#include <osg/GeometryNew> 
    2121#include <osg/Material> 
    2222#include <osg/Vec3> 
     
    3737 
    3838#include <iostream> 
     39 
    3940 
    4041// This demo illustrates how to create the various different types of geometry that 
     
    9394    { 
    9495        // create Geometry object to store all the vertices and points primitive. 
    95         osg::Geometry* pointsGeom = new osg::Geometry(); 
     96        osg::GeometryNew* pointsGeom = new osg::GeometryNew(); 
    9697         
    9798        // create a Vec3Array and add to it all my coordinates. 
     
    122123        // that only use one color for the whole object. 
    123124        pointsGeom->setColorArray(colors); 
    124         pointsGeom->setColorBinding(osg::Geometry::BIND_OVERALL); 
     125        pointsGeom->setColorBinding(osg::GeometryNew::BIND_OVERALL); 
    125126         
    126127         
     
    129130        normals->push_back(osg::Vec3(0.0f,-1.0f,0.0f)); 
    130131        pointsGeom->setNormalArray(normals); 
    131         pointsGeom->setNormalBinding(osg::Geometry::BIND_OVERALL); 
     132        pointsGeom->setNormalBinding(osg::GeometryNew::BIND_OVERALL); 
    132133 
    133134 
     
    147148    { 
    148149        // create Geometry object to store all the vertices and lines primitive. 
    149         osg::Geometry* linesGeom = new osg::Geometry(); 
     150        osg::GeometryNew* linesGeom = new osg::GeometryNew(); 
    150151         
    151152        // this time we'll preallocate the vertex array to the size we 
     
    170171        colors->push_back(osg::Vec4(1.0f,1.0f,0.0f,1.0f)); 
    171172        linesGeom->setColorArray(colors); 
    172         linesGeom->setColorBinding(osg::Geometry::BIND_OVERALL); 
     173        linesGeom->setColorBinding(osg::GeometryNew::BIND_OVERALL); 
    173174         
    174175 
     
    177178        normals->push_back(osg::Vec3(0.0f,-1.0f,0.0f)); 
    178179        linesGeom->setNormalArray(normals); 
    179         linesGeom->setNormalBinding(osg::Geometry::BIND_OVERALL); 
     180        linesGeom->setNormalBinding(osg::GeometryNew::BIND_OVERALL); 
    180181 
    181182 
     
    192193    { 
    193194        // create Geometry object to store all the vertices and lines primitive. 
    194         osg::Geometry* linesGeom = new osg::Geometry(); 
     195        osg::GeometryNew* linesGeom = new osg::GeometryNew(); 
    195196         
    196197        // this time we'll preallocate the vertex array to the size  
     
    212213        colors->push_back(osg::Vec4(1.0f,1.0f,0.0f,1.0f)); 
    213214        linesGeom->setColorArray(colors); 
    214         linesGeom->setColorBinding(osg::Geometry::BIND_OVERALL); 
     215        linesGeom->setColorBinding(osg::GeometryNew::BIND_OVERALL); 
    215216 
    216217 
     
    219220        normals->push_back(osg::Vec3(0.0f,-1.0f,0.0f)); 
    220221        linesGeom->setNormalArray(normals); 
    221         linesGeom->setNormalBinding(osg::Geometry::BIND_OVERALL); 
     222        linesGeom->setNormalBinding(osg::GeometryNew::BIND_OVERALL); 
    222223 
    223224 
     
    234235    { 
    235236        // create Geometry object to store all the vertices and lines primitive. 
    236         osg::Geometry* linesGeom = new osg::Geometry(); 
     237        osg::GeometryNew* linesGeom = new osg::GeometryNew(); 
    237238         
    238239        // this time we'll a C arrays to initialize the vertices. 
     
    259260        colors->push_back(osg::Vec4(1.0f,1.0f,0.0f,1.0f)); 
    260261        linesGeom->setColorArray(colors); 
    261         linesGeom->setColorBinding(osg::Geometry::BIND_OVERALL); 
     262        linesGeom->setColorBinding(osg::GeometryNew::BIND_OVERALL); 
    262263         
    263264 
     
    266267        normals->push_back(osg::Vec3(0.0f,-1.0f,0.0f)); 
    267268        linesGeom->setNormalArray(normals); 
    268         linesGeom->setNormalBinding(osg::Geometry::BIND_OVERALL); 
     269        linesGeom->setNormalBinding(osg::GeometryNew::BIND_OVERALL); 
    269270         
    270271 
     
    307308    { 
    308309        // create Geometry object to store all the vertices and lines primitive. 
    309         osg::Geometry* polyGeom = new osg::Geometry(); 
     310        osg::GeometryNew* polyGeom = new osg::GeometryNew(); 
    310311         
    311312        // this time we'll use C arrays to initialize the vertices. 
     
    333334        // use the shared color array. 
    334335        polyGeom->setColorArray(shared_colors.get()); 
    335         polyGeom->setColorBinding(osg::Geometry::BIND_OVERALL); 
     336        polyGeom->setColorBinding(osg::GeometryNew::BIND_OVERALL); 
    336337         
    337338 
    338339        // use the shared normal array. 
    339340        polyGeom->setNormalArray(shared_normals.get()); 
    340         polyGeom->setNormalBinding(osg::Geometry::BIND_OVERALL); 
     341        polyGeom->setNormalBinding(osg::GeometryNew::BIND_OVERALL); 
    341342         
    342343 
     
    355356    { 
    356357        // create Geometry object to store all the vertices and lines primitive. 
    357         osg::Geometry* polyGeom = new osg::Geometry(); 
     358        osg::GeometryNew* polyGeom = new osg::GeometryNew(); 
    358359         
    359360        // note, anticlockwise ordering. 
     
    380381        // use the shared color array. 
    381382        polyGeom->setColorArray(shared_colors.get()); 
    382         polyGeom->setColorBinding(osg::Geometry::BIND_OVERALL); 
     383        polyGeom->setColorBinding(osg::GeometryNew::BIND_OVERALL); 
    383384         
    384385 
    385386        // use the shared normal array. 
    386387        polyGeom->setNormalArray(shared_normals.get()); 
    387         polyGeom->setNormalBinding(osg::Geometry::BIND_OVERALL); 
     388        polyGeom->setNormalBinding(osg::GeometryNew::BIND_OVERALL); 
    388389         
    389390 
     
    402403    { 
    403404        // create Geometry object to store all the vertices and lines primitive. 
    404         osg::Geometry* polyGeom = new osg::Geometry(); 
     405        osg::GeometryNew* polyGeom = new osg::GeometryNew(); 
    405406         
    406407        // note, first coord at top, second at bottom, reverse to that buggy OpenGL image.. 
     
    429430        // use the shared color array. 
    430431        polyGeom->setColorArray(shared_colors.get()); 
    431         polyGeom->setColorBinding(osg::Geometry::BIND_OVERALL); 
     432        polyGeom->setColorBinding(osg::GeometryNew::BIND_OVERALL); 
    432433         
    433434 
    434435        // use the shared normal array. 
    435436        polyGeom->setNormalArray(shared_normals.get()); 
    436         polyGeom->setNormalBinding(osg::Geometry::BIND_OVERALL); 
     437        polyGeom->setNormalBinding(osg::GeometryNew::BIND_OVERALL); 
    437438         
    438439 
     
    451452    { 
    452453        // create Geometry object to store all the vertices and lines primitive. 
    453         osg::Geometry* polyGeom = new osg::Geometry(); 
     454        osg::GeometryNew* polyGeom = new osg::GeometryNew(); 
    454455         
    455456        // note, first coord at top, second at bottom, reverse to that buggy OpenGL image.. 
     
    497498        // use the shared color array. 
    498499        polyGeom->setColorArray(shared_colors.get()); 
    499         polyGeom->setColorBinding(osg::Geometry::BIND_OVERALL); 
     500        polyGeom->setColorBinding(osg::GeometryNew::BIND_OVERALL); 
    500501         
    501502 
    502503        // use the shared normal array. 
    503504        polyGeom->setNormalArray(shared_normals.get()); 
    504         polyGeom->setNormalBinding(osg::Geometry::BIND_OVERALL); 
     505        polyGeom->setNormalBinding(osg::GeometryNew::BIND_OVERALL); 
    505506         
    506507 
     
    571572  
    572573    // create Geometry object to store all the vertices and lines primitive. 
    573     osg::Geometry* polyGeom = new osg::Geometry(); 
     574    osg::GeometryNew* polyGeom = new osg::GeometryNew(); 
    574575 
    575576    // note, anticlockwise ordering. 
     
    590591    colors->push_back(osg::Vec4(1.0f,1.0f,1.0f,1.0f)); 
    591592    polyGeom->setColorArray(colors); 
    592     polyGeom->setColorBinding(osg::Geometry::BIND_OVERALL); 
     593    polyGeom->setColorBinding(osg::GeometryNew::BIND_OVERALL); 
    593594 
    594595 
     
    597598    normals->push_back(osg::Vec3(0.0f,-1.0f,0.0f)); 
    598599    polyGeom->setNormalArray(normals); 
    599     polyGeom->setNormalBinding(osg::Geometry::BIND_OVERALL); 
     600    polyGeom->setNormalBinding(osg::GeometryNew::BIND_OVERALL); 
    600601 
    601602    osg::Vec2 myTexCoords[] = 
  • OpenSceneGraph/trunk/src/osg/CMakeLists.txt

    r13462 r13470  
    257257    Geode.cpp 
    258258    Geometry.cpp 
     259    GeometryNew.cpp 
    259260    GL2Extensions.cpp 
    260261    GLExtensions.cpp