Changeset 394 for experimental/distortionNG/extViewer.cpp
- Timestamp:
- Jun 30, 2012, 8:56:16 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
experimental/distortionNG/extViewer.cpp
r392 r394 100 100 osg::Vec3 dy = yAxis*(height/((float)(rows-1))); 101 101 102 103 102 // Create vertices and coordinates 104 103 osg::Vec3Array* vertices = new osg::Vec3Array; … … 112 111 for ( unsigned int col=0; col<columns; col++ ) 113 112 { 113 osg::Vec3 vertex = origin+dy*row+dx*col; 114 114 115 // Create coordinates of the mesh node (geometry). 115 vertices->push_back( origin+dy*row+dx*col ); 116 117 // Create tex coordinates 118 osg::Vec2 texcoord = osg::Vec2((float)col/(float)(columns-1), (float)row/(float)(rows-1)); 116 vertices->push_back( vertex ); 119 117 120 118 // Set Coordinates for RTT-Texture (scene rendering) 121 texcoords0->push_back( texcoord);119 texcoords0->push_back( osg::Vec2( vertex.x(), vertex.y()) ); 122 120 123 121 // Set Color of the mesh node
Note: See TracChangeset
for help on using the changeset viewer.