diff --git a/include/osg/GeoSet b/include/osg/GeoSet index e62a3b2d8..e94d5c524 100644 --- a/include/osg/GeoSet +++ b/include/osg/GeoSet @@ -16,7 +16,11 @@ namespace osg { // forward declare so that we don't need to include the header. class Geometry; -/** Encapsulates OpenGL drawing primitives, geometry and +/** Note, osg::GeoSet is now deprecated, please use osg::Geometry instead. + osg::GeoSet will be kept through to the beta release for + backwards compatability only. + + Encapsulates OpenGL drawing primitives, geometry and optional binding of normal, color and texture coordinates. Used for representing the visible objects in the scene. State attributes for a GeoSet are maintained in StateSet which the GeoSet maintains diff --git a/include/osg/Primitive b/include/osg/Primitive index 64a2c1ea5..feef60cb8 100644 --- a/include/osg/Primitive +++ b/include/osg/Primitive @@ -9,7 +9,6 @@ namespace osg { - class Primitive : public Object { public: @@ -113,7 +112,8 @@ class SG_EXPORT DrawArrays : public Primitive GLsizei _count; }; -class SG_EXPORT UByteDrawElements : public Primitive, public std::vector +typedef std::vector UByteVector; +class SG_EXPORT UByteDrawElements : public Primitive, public UByteVector { public: @@ -122,20 +122,20 @@ class SG_EXPORT UByteDrawElements : public Primitive, public std::vector(array) {} + UByteVector(array) {} UByteDrawElements(GLenum mode,unsigned int no,unsigned char* ptr) : Primitive(UByteDrawElementsPrimitiveType,mode), - std::vector(ptr,ptr+no) {} + UByteVector(ptr,ptr+no) {} UByteDrawElements(GLenum mode,unsigned int no) : Primitive(UByteDrawElementsPrimitiveType,mode), - std::vector(no) {} + UByteVector(no) {} template UByteDrawElements(GLenum mode, InputIterator first,InputIterator last) : Primitive(UByteDrawElementsPrimitiveType,mode), - std::vector(first,last) {} + UByteVector(first,last) {} virtual Object* cloneType() const { return osgNew UByteDrawElements(); } virtual Object* clone(const CopyOp& copyop) const { return osgNew UByteDrawElements(*this,copyop); } @@ -148,7 +148,9 @@ class SG_EXPORT UByteDrawElements : public Primitive, public std::vector + +typedef std::vector UShortVector; +class SG_EXPORT UShortDrawElements : public Primitive, public UShortVector { public: @@ -157,20 +159,20 @@ class SG_EXPORT UShortDrawElements : public Primitive, public std::vector(array) {} + UShortVector(array) {} UShortDrawElements(GLenum mode,unsigned int no,unsigned short* ptr) : Primitive(UShortDrawElementsPrimitiveType,mode), - std::vector(ptr,ptr+no) {} + UShortVector(ptr,ptr+no) {} UShortDrawElements(GLenum mode,unsigned int no) : Primitive(UShortDrawElementsPrimitiveType,mode), - std::vector(no) {} + UShortVector(no) {} template UShortDrawElements(GLenum mode, InputIterator first,InputIterator last) : Primitive(UShortDrawElementsPrimitiveType,mode), - std::vector(first,last) {} + UShortVector(first,last) {} virtual Object* cloneType() const { return osgNew UShortDrawElements(); } virtual Object* clone(const CopyOp& copyop) const { return osgNew UShortDrawElements(*this,copyop); } @@ -183,7 +185,8 @@ class SG_EXPORT UShortDrawElements : public Primitive, public std::vector +typedef std::vector UIntVector; +class SG_EXPORT UIntDrawElements : public Primitive, public UIntVector { public: @@ -192,20 +195,20 @@ class SG_EXPORT UIntDrawElements : public Primitive, public std::vector(array) {} + UIntVector(array) {} UIntDrawElements(GLenum mode,unsigned int no,unsigned int* ptr) : Primitive(UIntDrawElementsPrimitiveType,mode), - std::vector(ptr,ptr+no) {} + UIntVector(ptr,ptr+no) {} UIntDrawElements(GLenum mode,unsigned int no) : Primitive(UIntDrawElementsPrimitiveType,mode), - std::vector(no) {} + UIntVector(no) {} template UIntDrawElements(GLenum mode, InputIterator first,InputIterator last) : Primitive(UIntDrawElementsPrimitiveType,mode), - std::vector(first,last) {} + UIntVector(first,last) {} virtual Object* cloneType() const { return osgNew UIntDrawElements(); } virtual Object* clone(const CopyOp& copyop) const { return osgNew UIntDrawElements(*this,copyop); }