Re: [osg-users] TriMeshVisitor possible bug?

2013-02-14 Thread Paul Martz
Ah. I see. The code assumes all vertices in a DrawArrays are unique. I
mistakenly expected that the code was doing vertex (and attribute)
comparisons and eliminating vertices that were duplicates.


On Thu, Feb 14, 2013 at 12:32 AM, Sergey Polischuk pol...@yandex.ru wrote:

  Hi

 Looks ok to me
 as it written in comment, code converts DrawArrays to DrawElements, and if
 primitive set is already indexed it is not DrawArrays any more, and there
 should not be duplicate vertices in first place (besides ones with same
 vertex position but different other vertex attributes like tc's or normals)

 Cheers.

 14.02.2013, 01:17, Paul Martz skewmat...@gmail.com:

 Hi all -- Primarily Tim Moore...

 The code comments for osgUtil::IndexMeshVisitor reads as follows:
 // Convert geometry that uses DrawArrays to DrawElements i.e.,
 // construct a real mesh. This removes duplicate vertices.

 However, if a PrimitiveSet is already indexed (i.e., DrawElementsUInt),
 then the code skips removal of duplicate vertices. Is this the intended
 behavior? From reading the documentation, I expected the code would still
 go through and remove the duplicate vertices.

 Does the code need to be corrected, or the code comment?

 --
 Paul Martz
 Skew Matrix Software LLC
 ,

 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




-- 
Paul Martz
Skew Matrix Software LLC
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] TriMeshVisitor possible bug?

2013-02-13 Thread Paul Martz
Hi all -- Primarily Tim Moore...

The code comments for osgUtil::IndexMeshVisitor reads as follows:
// Convert geometry that uses DrawArrays to DrawElements i.e.,
// construct a real mesh. This removes duplicate vertices.

However, if a PrimitiveSet is already indexed (i.e., DrawElementsUInt),
then the code skips removal of duplicate vertices. Is this the intended
behavior? From reading the documentation, I expected the code would still
go through and remove the duplicate vertices.

Does the code need to be corrected, or the code comment?

-- 
Paul Martz
Skew Matrix Software LLC
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] TriMeshVisitor possible bug?

2013-02-13 Thread Sergey Polischuk
 Hi Looks ok to meas it written in comment, code converts DrawArrays to DrawElements, and if primitive set is already indexed it is not DrawArrays any more, and there should not be duplicate vertices in first place (besides ones with same vertex position but different other vertex attributes like tc's or normals) Cheers. 14.02.2013, 01:17, "Paul Martz" skewmat...@gmail.com:Hi all -- Primarily Tim Moore... The code comments for osgUtil::IndexMeshVisitor reads as follows:// Convert geometry that uses DrawArrays to DrawElements i.e.,// construct a real mesh. This removes duplicate vertices. However, if a PrimitiveSet is already indexed (i.e., DrawElementsUInt), then the code skips removal of duplicate vertices. Is this the intended behavior? From reading the documentation, I expected the code would still go through and remove the duplicate vertices. Does the code need to be corrected, or the code comment? -- Paul Martz Skew Matrix Software LLC,___osg-users mailing listosg-users@lists.openscenegraph.orghttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org