Re: [osg-users] osg::DrawElements - i missed something?

2010-10-28 Thread Robert Gosztyla
Hi, I have no errors, just version using draw elements is not displayed. I'm using VC2008 Express under Vista64 on GF9800GT. Are there any limitations using draw elements i should know about? Thank you! Cheers, Robert -- Read this topic online here:

Re: [osg-users] osg::DrawElements - i missed something?

2010-10-28 Thread Robert Gosztyla
Hi, I have found one interesting behaviour yet: osg::ref_ptr osg::UIntArray array = new osg::UIntArray(); array-push_back( 0 ); array-push_back( 1 ); array-push_back( 2 ); array-push_back( 3 ); p_geometry-addPrimitiveSet( new osg::DrawElementsUInt( osg::PrimitiveSet::TRIANGLES,

[osg-users] osg::DrawElements - i missed something?

2010-10-27 Thread Robert Gosztyla
Hi, Small piece of code: Code: osg::ref_ptr osg::Vec3Array verts = new osg::Vec3Array(); verts-push_back(osg::Vec3(-100.0f, 200.0f,-100.0f ) ); verts-push_back(osg::Vec3( 100.0f, 200.0f,-100.0f ) ); verts-push_back(osg::Vec3( 100.0f, 200.0f, 100.0f ) ); verts-push_back(osg::Vec3(-100.0f,

Re: [osg-users] osg::DrawElements - i missed something?

2010-10-27 Thread Wang Rui
Hi Robert, DrawElementsUInt can make use of std::vector methods directly, such like: osg::DrawElementsUInt* de = new osg::DrawElementsUInt(osg::PrimitiveSet::LINE_LOOP); de-push_back( 0 ); de-push_back( 1 ); de-push_back( 2 ); Or de-resize(3); (*de)[0] = 0; (*de)[1] = 1; (*de)[2] = 2; Just

Re: [osg-users] osg::DrawElements - i missed something?

2010-10-27 Thread Robert Gosztyla
Hi, Hmm, the same effect, doesn't work (why should?). There is something wrong with elements-addElement() method? Thank you! Cheers, Robert -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33151#33151

Re: [osg-users] osg::DrawElements - i missed something?

2010-10-27 Thread Wang Rui
Hi Robert, In fact both your code and mine work fine under my platform. It is OK to use addElement(), too and a triangle line (made up by the first three elements in the vertex array) will appear. Is there something wrong with your makefile or project settings? What is the error message? Cheers,