Fixes for .osg output of UByte4 values, and added missing template contructor

to DrawElementsUShort.
This commit is contained in:
Robert Osfield
2003-09-16 19:54:57 +00:00
parent e7b1edef56
commit cec0b35cd4
3 changed files with 10 additions and 5 deletions

View File

@@ -392,6 +392,11 @@ class SG_EXPORT DrawElementsUInt : public PrimitiveSet, public VectorUInt
PrimitiveSet(DrawElementsUIntPrimitiveType,mode),
VectorUInt(no) {}
template <class InputIterator>
DrawElementsUInt(GLenum mode, InputIterator first,InputIterator last) :
PrimitiveSet(DrawElementsUIntPrimitiveType,mode),
VectorUInt(first,last) {}
virtual Object* cloneType() const { return new DrawElementsUInt(); }
virtual Object* clone(const CopyOp& copyop) const { return new DrawElementsUInt(*this,copyop); }
virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast<const DrawElementsUInt*>(obj)!=NULL; }

View File

@@ -148,10 +148,10 @@ class UByte4
friend inline std::ostream& operator << (std::ostream& output, const UByte4& vec)
{
output << vec._v[0] << " "
<< vec._v[1] << " "
<< vec._v[2] << " "
<< vec._v[3];
output << (int)vec._v[0] << " "
<< (int)vec._v[1] << " "
<< (int)vec._v[2] << " "
<< (int)vec._v[3];
return output; // to enable cascading
}