Re: [osg-users] PrimitiveSet constructors, const correctness issue

2008-02-15 Thread Robert Osfield
Hi Paul,

Since the constructor is copying the indices rather than taking
ownership of them then it is more appropriate to use const GLuint*.

I've updated the relevant code and am now waiting on a clean build to
make sure that everything builds cleanly.

Robert.

On Wed, Feb 13, 2008 at 8:37 PM, Paul Martz [EMAIL PROTECTED] wrote:
 I just noticed the following PrimitiveSet constructor...

  DrawElementsUInt(GLenum mode,unsigned int no,GLuint* ptr) :

  The first parameter is the primitive type, the second is the number of
  element indices, and the third is a pointer to an array of indices.

  Shouldn't the third parameter be const? I'm sure  the constructor isn't
  going to modify that data, so at a conceptual level, it should be const.
  However, I didn't dig deep enough into the layers of templates and derived
  classes to determine if it needs to be non-const for some other reason.

  Paul Martz
  Skew Matrix Software LLC
  http://www.skew-matrix.com http://www.skew-matrix.com/
  303 859 9466

  ___
  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


Re: [osg-users] PrimitiveSet constructors, const correctness issue

2008-02-15 Thread Paul Martz
 It all works fine, now checked in.

Thanks, I think that makes more sense.
   -Paul

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


[osg-users] PrimitiveSet constructors, const correctness issue

2008-02-13 Thread Paul Martz
I just noticed the following PrimitiveSet constructor...

DrawElementsUInt(GLenum mode,unsigned int no,GLuint* ptr) :  

The first parameter is the primitive type, the second is the number of
element indices, and the third is a pointer to an array of indices.

Shouldn't the third parameter be const? I'm sure  the constructor isn't
going to modify that data, so at a conceptual level, it should be const.
However, I didn't dig deep enough into the layers of templates and derived
classes to determine if it needs to be non-const for some other reason.

Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com http://www.skew-matrix.com/ 
303 859 9466

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