Changeset 321 for experimental/distortionNG
- Timestamp:
- Sep 8, 2011, 10:29:38 PM (13 years ago)
- Location:
- experimental/distortionNG
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
experimental/distortionNG/extViewer.cpp
r320 r321 5 5 #include<osg/TexMat> 6 6 #include<osg/ComputeBoundsVisitor> 7 #include<osg/Vec2> 7 8 8 9 #include<osgDB/ReadFile> … … 118 119 osg::Geode* geode = new osg::Geode(); 119 120 //geode->addDrawable(createParoramicSphericalDisplayDistortionMesh(osg::Vec3(0.0f,0.0f,0.0f), osg::Vec3(width,0.0f,0.0f), osg::Vec3(0.0f,height,0.0f), 1, 0.45, 0, projectorMatrix)); 120 geode->addDrawable(createMesh(osg::Vec3(0.0f,0.0f,0.0f), osg::Vec3(width,0.0f,0.0f), osg::Vec3(0.0f,height,0.0f), 3, 3));121 geode->addDrawable(createMesh(osg::Vec3(0.0f,0.0f,0.0f), osg::Vec3(width,0.0f,0.0f), osg::Vec3(0.0f,height,0.0f), 4, 4)); 121 122 122 123 // new we need to add the texture to the mesh, we do so by creating a … … 192 193 { 193 194 vertices->push_back( origin+dy*row+dx*col ); 194 texcoords0->push_back( osg::Vec2((float)col/(float)(columns-1), (float)row/(float)(rows-1)) ); 195 osg::Vec2 texcoord = osg::Vec2((float)col/(float)(columns-1), (float)row/(float)(rows-1)); 196 texcoords0->push_back( texcoord ); 195 197 196 198 // if (intensityMap) … … 234 236 } 235 237 236 237 238 /*osg::ref_ptr<osg::Texture2D> texture = new osg::Texture2D;239 texture->setImage( osgDB::readImageFile("Images/osg256.png") );240 texture->setFilter( osg::Texture2D::MIN_FILTER, osg::Texture2D::LINEAR_MIPMAP_LINEAR );241 texture->setFilter( osg::Texture2D::MAG_FILTER, osg::Texture2D::LINEAR_MIPMAP_LINEAR );242 geom->getOrCreateStateSet()->setTextureAttributeAndModes( 0, texture.get() );*/243 244 245 238 return geom.release(); 246 239 } -
experimental/distortionNG/main.cpp
r315 r321 42 42 extViewer viewer(arguments); 43 43 viewer.setUpViewForManualDistortion(); 44 45 44 46 45 // set up the camera manipulators.
Note: See TracChangeset
for help on using the changeset viewer.