~ubuntu-branches/debian/sid/openscenegraph/sid

« back to all changes in this revision

Viewing changes to OpenSceneGraph/examples/osgocclusionquery/osgocclusionquery.cpp

  • Committer: Package Import Robot
  • Author(s): Manuel A. Fernandez Montecelo, Alberto Luaces, Manuel A. Fernandez Montecelo
  • Date: 2013-07-30 13:07:57 UTC
  • mfrom: (1.4.3)
  • Revision ID: package-import@ubuntu.com-20130730130757-b3weq3502sennb16
Tags: 3.2.0~rc1-1
[Alberto Luaces]
* New upstream release.
* Updated standards version (3.9.4).
* Updated SVN URL.
* Removed the static version of the libraries since they impose a huge
  load on the build servers, add additional complexity on the build
  scripts, and make a great impact on the size of the packages, given
  the very small cases where they are useful.
* Acknowledge NMU.

[ Manuel A. Fernandez Montecelo ]
* Switch to @debian.org address

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
// example uses a NodeVisitor to try to find worthwhile locations
34
34
// for OcclusionQueryNodes in your the scene graph.
35
35
 
36
 
 
37
 
 
38
36
#include <osg/NodeVisitor>
39
37
#include <osg/Geode>
40
38
#include <osg/Geometry>
568
566
    state->setAttributeAndModes( pm,
569
567
        osg::StateAttribute::ON | osg::StateAttribute::PROTECTED );
570
568
 
571
 
    osg::ref_ptr<osg::Geometry> geom = new osg::Geometry;
 
569
    osg::ref_ptr<deprecated_osg::Geometry> geom = new deprecated_osg::Geometry;
572
570
    osg::ref_ptr<osg::Vec3Array> v = new osg::Vec3Array;
573
571
    geom->setVertexArray( v.get() );
574
572
 
606
604
 
607
605
    osg::ref_ptr<osg::Vec4Array> c = new osg::Vec4Array;
608
606
    geom->setColorArray( c.get() );
609
 
    geom->setColorBinding( osg::Geometry::BIND_OVERALL );
 
607
    geom->setColorBinding( deprecated_osg::Geometry::BIND_OVERALL );
610
608
    c->push_back( osg::Vec4( 0.f, 1.f, 1.f, 1.f ) );
611
609
 
612
610
    osg::ref_ptr<osg::Vec3Array> n = new osg::Vec3Array;
613
611
    geom->setNormalArray( n.get() );
614
 
    geom->setNormalBinding( osg::Geometry::BIND_PER_PRIMITIVE );
 
612
    geom->setNormalBinding( deprecated_osg::Geometry::BIND_PER_PRIMITIVE );
615
613
    n->push_back( osg::Vec3( -1.f, 0.f, 0.f ) );
616
614
    n->push_back( osg::Vec3( 1.f, 0.f, 0.f ) );
617
615
    n->push_back( osg::Vec3( 0.f, 0.f, -1.f ) );
646
644
    ss->setMode( GL_LIGHTING, osg::StateAttribute::OFF |
647
645
        osg::StateAttribute::PROTECTED);
648
646
 
649
 
    osg::ref_ptr<osg::Geometry> geom = new osg::Geometry;
 
647
    osg::ref_ptr<deprecated_osg::Geometry> geom = new deprecated_osg::Geometry;
650
648
    // Disable display lists to decrease performance.
651
649
    geom->setUseDisplayList( false );
652
650
 
670
668
    osg::ref_ptr<osg::Vec4Array> c = new osg::Vec4Array;
671
669
    geom->setColorArray( c.get() );
672
670
    // Bind per primitive to force slow glBegin/glEnd path.
673
 
    geom->setColorBinding( osg::Geometry::BIND_PER_PRIMITIVE );
 
671
    geom->setColorBinding( deprecated_osg::Geometry::BIND_PER_PRIMITIVE );
674
672
    c->resize( num );
675
673
 
676
674
#define RAND_0_TO_1 ( (rand()%10)*.1 )