Changeset 326
- Timestamp:
- Feb 20, 2012, 9:58:21 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
experimental/distortionNG/extViewer.cpp
r325 r326 115 115 } 116 116 117 getCamera()->setProjectionMatrixAsPerspective(90.0f, (float)tex_width/(float)tex_height, 1, 1000.0); 118 117 119 // distortion correction set up. 118 120 { 119 121 osg::Geode* geode = new osg::Geode(); 120 122 //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)); 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));123 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), 20, 20)); 122 124 123 125 // new we need to add the texture to the mesh, we do so by creating a … … 209 211 } 210 212 211 212 213 // Pass the created vertex array to the points geometry object. 213 214 geom->setUseVertexBufferObjects( true ); … … 219 220 geom->setTexCoordArray(0,texcoords0); 220 221 //if (texcoords1) geometry->setTexCoordArray(1,texcoords1); 221 222 223 222 224 223 // osg::DrawElementsUShort* elements = new osg::DrawElementsUShort(osg::PrimitiveSet::TRIANGLES);
Note: See TracChangeset
for help on using the changeset viewer.