[osg-users] osggeometryshaders example question

Mike Greene mgreene at hiwaay.net
Tue Sep 12 08:12:45 PDT 2017


Hi,

In reference to the osggeometryshaders example, I have a question about a seeming problem when only passing one point to the geometry shader: 

If I comment out all but the first push back:

Code:
osg::Vec3Array* vAry = new osg::Vec3Array;
setVertexArray( vAry );
vAry->push_back( osg::Vec3(0,0,0) );
/*vAry->push_back( osg::Vec3(0,1,0) );
vAry->push_back( osg::Vec3(1,0,0) );
vAry->push_back( osg::Vec3(1,1,0) );
vAry->push_back( osg::Vec3(0,0,1) );
vAry->push_back( osg::Vec3(0,1,1) );
vAry->push_back( osg::Vec3(1,0,1) );
vAry->push_back( osg::Vec3(1,1,1) );*/




Nothing shows up. But if I do two, three or more points, every thing works fine. It seems a minimum of two points in the DrawArrays array is required?

Thank you!

Cheers,
Mike[/code]

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=71697#71697







More information about the osg-users mailing list