Fixed warnings, updated NEWS
This commit is contained in:
parent
6710fbc78a
commit
411431f3be
3
NEWS.txt
3
NEWS.txt
@ -22,9 +22,10 @@ The !OpenSceneGraph 2.8 release is the culmination of 9 years of work by the lea
|
||||
* New PDF widget support (based on libPoppler)
|
||||
* New VNC client widget support (based on libVNCServer)
|
||||
* New Browser client widget support (based on Gecko/UBrowser)
|
||||
* New plugins for loading Half-Life 2 maps and models.
|
||||
* Improvements to DatabasePager tailored for low latency paging.
|
||||
* Improved stats collection and on screen reporting.
|
||||
* Support for the OpenGL geometry instancing extension.
|
||||
* Support for the OpenGL draw instanced extension.
|
||||
* Improvements to COLLADA support.
|
||||
* Build reporting using CDash
|
||||
* New Packing support using CPack
|
||||
|
@ -226,8 +226,8 @@ class TemplateArray : public Array, public MixinVector<T>
|
||||
}
|
||||
|
||||
virtual const GLvoid* getDataPointer() const { if (!this->empty()) return &this->front(); else return 0; }
|
||||
virtual unsigned int getTotalDataSize() const { return this->size()*sizeof(T); }
|
||||
virtual unsigned int getNumElements() const { return this->size(); }
|
||||
virtual unsigned int getTotalDataSize() const { return static_cast<unsigned int>(this->size()*sizeof(T)); }
|
||||
virtual unsigned int getNumElements() const { return static_cast<unsigned int>(this->size()); }
|
||||
|
||||
typedef T ElementDataType; // expose T
|
||||
|
||||
@ -312,8 +312,8 @@ class TemplateIndexArray : public IndexArray, public MixinVector<T>
|
||||
}
|
||||
|
||||
virtual const GLvoid* getDataPointer() const { if (!this->empty()) return &this->front(); else return 0; }
|
||||
virtual unsigned int getTotalDataSize() const { return this->size()*sizeof(T); }
|
||||
virtual unsigned int getNumElements() const { return this->size(); }
|
||||
virtual unsigned int getTotalDataSize() const { return static_cast<unsigned int>(this->size()*sizeof(T)); }
|
||||
virtual unsigned int getNumElements() const { return static_cast<unsigned int>(this->size()); }
|
||||
|
||||
virtual unsigned int index(unsigned int pos) const { return (*this)[pos]; }
|
||||
|
||||
|
@ -154,7 +154,7 @@ class OSG_EXPORT Drawable : public Object
|
||||
* Get the number of parents of node.
|
||||
* @return the number of parents of this node.
|
||||
*/
|
||||
inline unsigned int getNumParents() const { return _parents.size(); }
|
||||
inline unsigned int getNumParents() const { return static_cast<unsigned int>(_parents.size()); }
|
||||
|
||||
/** Get the list of matrices that transform this node from local coordinates to world coordinates.
|
||||
* The optional Node* haltTraversalAtNode allows the user to prevent traversal beyond a specifed node. */
|
||||
|
@ -199,7 +199,7 @@ class OSG_EXPORT Geometry : public Drawable
|
||||
ArrayData& getTexCoordData(unsigned int index);
|
||||
const ArrayData& getTexCoordData(unsigned int index) const;
|
||||
|
||||
unsigned int getNumTexCoordArrays() const { return _texCoordList.size(); }
|
||||
unsigned int getNumTexCoordArrays() const { return static_cast<unsigned int>(_texCoordList.size()); }
|
||||
ArrayDataList& getTexCoordArrayList() { return _texCoordList; }
|
||||
const ArrayDataList& getTexCoordArrayList() const { return _texCoordList; }
|
||||
|
||||
@ -219,7 +219,7 @@ class OSG_EXPORT Geometry : public Drawable
|
||||
ArrayData& getVertexAttribData(unsigned int index);
|
||||
const ArrayData& getVertexAttribData(unsigned int index) const;
|
||||
|
||||
unsigned int getNumVertexAttribArrays() const { return _vertexAttribList.size(); }
|
||||
unsigned int getNumVertexAttribArrays() const { return static_cast<unsigned int>(_vertexAttribList.size()); }
|
||||
ArrayDataList& getVertexAttribArrayList() { return _vertexAttribList; }
|
||||
const ArrayDataList& getVertexAttribArrayList() const { return _vertexAttribList; }
|
||||
|
||||
@ -231,7 +231,7 @@ class OSG_EXPORT Geometry : public Drawable
|
||||
PrimitiveSetList& getPrimitiveSetList() { return _primitives; }
|
||||
const PrimitiveSetList& getPrimitiveSetList() const { return _primitives; }
|
||||
|
||||
unsigned int getNumPrimitiveSets() const { return _primitives.size(); }
|
||||
unsigned int getNumPrimitiveSets() const { return static_cast<unsigned int>(_primitives.size()); }
|
||||
PrimitiveSet* getPrimitiveSet(unsigned int pos) { return _primitives[pos].get(); }
|
||||
const PrimitiveSet* getPrimitiveSet(unsigned int pos) const { return _primitives[pos].get(); }
|
||||
|
||||
|
@ -97,7 +97,7 @@ class OSG_EXPORT Group : public Node
|
||||
virtual bool replaceChild( Node *origChild, Node* newChild );
|
||||
|
||||
/** Return the number of children nodes. */
|
||||
inline unsigned int getNumChildren() const { return _children.size(); }
|
||||
inline unsigned int getNumChildren() const { return static_cast<unsigned int>(_children.size()); }
|
||||
|
||||
/** Set child node at position i.
|
||||
* Return true if set correctly, false on failure (if node==NULL || i is out of range).
|
||||
@ -139,7 +139,7 @@ class OSG_EXPORT Group : public Node
|
||||
{
|
||||
if (_children[childNum]==node) return childNum;
|
||||
}
|
||||
return _children.size(); // node not found.
|
||||
return static_cast<unsigned int>(_children.size()); // node not found.
|
||||
}
|
||||
|
||||
/** Set whether to use a mutex to ensure ref() and unref() are thread safe.*/
|
||||
|
@ -273,7 +273,7 @@ class OSG_EXPORT Image : public Object
|
||||
|
||||
unsigned int getNumMipmapLevels() const
|
||||
{
|
||||
return _mipmapData.size()+1;
|
||||
return static_cast<unsigned int>(_mipmapData.size())+1;
|
||||
};
|
||||
|
||||
/** Send offsets into data. It is assumed that first mipmap offset (index 0) is 0.*/
|
||||
|
@ -131,7 +131,7 @@ class OSG_EXPORT KdTree : public osg::Shape
|
||||
|
||||
int addNode(const KdNode& node)
|
||||
{
|
||||
int num = _kdNodes.size();
|
||||
int num = static_cast<int>(_kdNodes.size());
|
||||
_kdNodes.push_back(node);
|
||||
return num;
|
||||
}
|
||||
@ -147,7 +147,7 @@ class OSG_EXPORT KdTree : public osg::Shape
|
||||
|
||||
unsigned int addTriangle(const Triangle& tri)
|
||||
{
|
||||
unsigned int num = _triangles.size();
|
||||
unsigned int num = static_cast<unsigned int>(_triangles.size());
|
||||
_triangles.push_back(tri);
|
||||
return num;
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ class OSG_EXPORT Node : public Object
|
||||
* Get the number of parents of node.
|
||||
* @return the number of parents of this node.
|
||||
*/
|
||||
inline unsigned int getNumParents() const { return _parents.size(); }
|
||||
inline unsigned int getNumParents() const { return static_cast<unsigned int>(_parents.size()); }
|
||||
|
||||
/** Get the list of node paths parent paths.
|
||||
* The optional Node* haltTraversalAtNode allows the user to prevent traversal beyond a specifed node. */
|
||||
@ -279,7 +279,7 @@ class OSG_EXPORT Node : public Object
|
||||
inline std::string& getDescription(unsigned int i) { return _descriptions[i]; }
|
||||
|
||||
/** Get the number of descriptions of the node.*/
|
||||
inline unsigned int getNumDescriptions() const { return _descriptions.size(); }
|
||||
inline unsigned int getNumDescriptions() const { return static_cast<unsigned int>(_descriptions.size()); }
|
||||
|
||||
/** Add a description string to the node.*/
|
||||
void addDescription(const std::string& desc) { _descriptions.push_back(desc); }
|
||||
|
@ -108,7 +108,7 @@ class OSG_EXPORT OperationQueue : public Referenced
|
||||
bool empty() const { return _operations.empty(); }
|
||||
|
||||
/** Return the num of pending operations that are sitting in the OperationQueue.*/
|
||||
unsigned int getNumOperationsInQueue() const { return _operations.size(); }
|
||||
unsigned int getNumOperationsInQueue() const { return static_cast<unsigned int>(_operations.size()); }
|
||||
|
||||
/** Add operation to end of OperationQueue, this will be
|
||||
* executed by the operation thread once this operation gets to the head of the queue.*/
|
||||
|
@ -316,8 +316,8 @@ class OSG_EXPORT DrawArrays : public PrimitiveSet
|
||||
virtual void accept(PrimitiveFunctor& functor) const;
|
||||
virtual void accept(PrimitiveIndexFunctor& functor) const;
|
||||
|
||||
virtual unsigned int getNumIndices() const { return _count; }
|
||||
virtual unsigned int index(unsigned int pos) const { return _first+pos; }
|
||||
virtual unsigned int getNumIndices() const { return static_cast<unsigned int>(_count); }
|
||||
virtual unsigned int index(unsigned int pos) const { return static_cast<unsigned int>(_first)+pos; }
|
||||
virtual void offsetIndices(int offset) { _first += offset; }
|
||||
|
||||
protected:
|
||||
@ -493,7 +493,7 @@ class OSG_EXPORT DrawElementsUByte : public DrawElements, public VectorGLubyte
|
||||
virtual const char* className() const { return "DrawElementsUByte"; }
|
||||
|
||||
virtual const GLvoid* getDataPointer() const { return empty()?0:&front(); }
|
||||
virtual unsigned int getTotalDataSize() const { return size(); }
|
||||
virtual unsigned int getTotalDataSize() const { return static_cast<unsigned int>(size()); }
|
||||
virtual bool supportsBufferObject() const { return false; }
|
||||
|
||||
virtual void draw(State& state, bool useVertexBufferObjects) const ;
|
||||
@ -501,7 +501,7 @@ class OSG_EXPORT DrawElementsUByte : public DrawElements, public VectorGLubyte
|
||||
virtual void accept(PrimitiveFunctor& functor) const;
|
||||
virtual void accept(PrimitiveIndexFunctor& functor) const;
|
||||
|
||||
virtual unsigned int getNumIndices() const { return size(); }
|
||||
virtual unsigned int getNumIndices() const { return static_cast<unsigned int>(size()); }
|
||||
virtual unsigned int index(unsigned int pos) const { return (*this)[pos]; }
|
||||
virtual void offsetIndices(int offset);
|
||||
|
||||
@ -568,7 +568,7 @@ class OSG_EXPORT DrawElementsUShort : public DrawElements, public VectorGLushort
|
||||
virtual const char* className() const { return "DrawElementsUShort"; }
|
||||
|
||||
virtual const GLvoid* getDataPointer() const { return empty()?0:&front(); }
|
||||
virtual unsigned int getTotalDataSize() const { return 2*size(); }
|
||||
virtual unsigned int getTotalDataSize() const { return 2u*static_cast<unsigned int>(size()); }
|
||||
virtual bool supportsBufferObject() const { return false; }
|
||||
|
||||
virtual void draw(State& state, bool useVertexBufferObjects) const;
|
||||
@ -576,7 +576,7 @@ class OSG_EXPORT DrawElementsUShort : public DrawElements, public VectorGLushort
|
||||
virtual void accept(PrimitiveFunctor& functor) const;
|
||||
virtual void accept(PrimitiveIndexFunctor& functor) const;
|
||||
|
||||
virtual unsigned int getNumIndices() const { return size(); }
|
||||
virtual unsigned int getNumIndices() const { return static_cast<unsigned int>(size()); }
|
||||
virtual unsigned int index(unsigned int pos) const { return (*this)[pos]; }
|
||||
virtual void offsetIndices(int offset);
|
||||
|
||||
@ -642,7 +642,7 @@ class OSG_EXPORT DrawElementsUInt : public DrawElements, public VectorGLuint
|
||||
virtual const char* className() const { return "DrawElementsUInt"; }
|
||||
|
||||
virtual const GLvoid* getDataPointer() const { return empty()?0:&front(); }
|
||||
virtual unsigned int getTotalDataSize() const { return 4*size(); }
|
||||
virtual unsigned int getTotalDataSize() const { return 4u*static_cast<unsigned int>(size()); }
|
||||
virtual bool supportsBufferObject() const { return false; }
|
||||
|
||||
virtual void draw(State& state, bool useVertexBufferObjects) const;
|
||||
@ -650,7 +650,7 @@ class OSG_EXPORT DrawElementsUInt : public DrawElements, public VectorGLuint
|
||||
virtual void accept(PrimitiveFunctor& functor) const;
|
||||
virtual void accept(PrimitiveIndexFunctor& functor) const;
|
||||
|
||||
virtual unsigned int getNumIndices() const { return size(); }
|
||||
virtual unsigned int getNumIndices() const { return static_cast<unsigned int>(size()); }
|
||||
virtual unsigned int index(unsigned int pos) const { return (*this)[pos]; }
|
||||
virtual void offsetIndices(int offset);
|
||||
|
||||
|
@ -83,7 +83,7 @@ class OSG_EXPORT Program : public osg::StateAttribute
|
||||
* Mark Program as needing relink. Return true for success */
|
||||
bool addShader( Shader* shader );
|
||||
|
||||
unsigned int getNumShaders() const { return _shaderList.size(); }
|
||||
unsigned int getNumShaders() const { return static_cast<unsigned int>(_shaderList.size()); }
|
||||
|
||||
Shader* getShader( unsigned int i ) { return _shaderList[i].get(); }
|
||||
const Shader* getShader( unsigned int i ) const { return _shaderList[i].get(); }
|
||||
|
@ -609,7 +609,7 @@ class OSG_EXPORT CompositeShape : public Shape
|
||||
const Shape* getShape() const { return _shape.get(); }
|
||||
|
||||
/** Get the number of children of this composite shape.*/
|
||||
unsigned int getNumChildren() const { return _children.size(); }
|
||||
unsigned int getNumChildren() const { return static_cast<unsigned int>(_children.size()); }
|
||||
|
||||
/** Get a child.*/
|
||||
Shape* getChild(unsigned int i) { return _children[i].get(); }
|
||||
@ -631,7 +631,7 @@ class OSG_EXPORT CompositeShape : public Shape
|
||||
{
|
||||
if (_children[childNo]==shape) return childNo;
|
||||
}
|
||||
return _children.size(); // node not found.
|
||||
return static_cast<unsigned int>(_children.size()); // node not found.
|
||||
|
||||
}
|
||||
|
||||
|
@ -134,7 +134,7 @@ class OSG_EXPORT State : public Referenced, public Observer
|
||||
void removeStateSet(unsigned int pos);
|
||||
|
||||
/** Get the number of StateSet's on the StateSet stack.*/
|
||||
unsigned int getStateSetStackSize() { return _stateStateStack.size(); }
|
||||
unsigned int getStateSetStackSize() { return static_cast<unsigned int>(_stateStateStack.size()); }
|
||||
|
||||
/** Pop StateSet's for the StateSet stack till its size equals the specified size.*/
|
||||
void popStateSetStackToSize(unsigned int size) { while (_stateStateStack.size()>size) popStateSet(); }
|
||||
|
@ -256,7 +256,7 @@ class OSG_EXPORT StateAttribute : public Object
|
||||
* Get the number of parents of this StateAttribute.
|
||||
* @return the number of parents of this StateAttribute.
|
||||
*/
|
||||
inline unsigned int getNumParents() const { return _parents.size(); }
|
||||
inline unsigned int getNumParents() const { return static_cast<unsigned int>(_parents.size()); }
|
||||
|
||||
|
||||
struct ModeUsage
|
||||
|
@ -89,7 +89,7 @@ class OSG_EXPORT StateSet : public Object
|
||||
* Get the number of parents of this StateSet.
|
||||
* @return the number of parents of this StateSet.
|
||||
*/
|
||||
inline unsigned int getNumParents() const { return _parents.size(); }
|
||||
inline unsigned int getNumParents() const { return static_cast<unsigned int>(_parents.size()); }
|
||||
|
||||
|
||||
/** Compute the DataVariance based on an assessment of callback etc.*/
|
||||
|
@ -38,7 +38,7 @@ class OSG_EXPORT Stats : public osg::Referenced
|
||||
|
||||
void allocate(unsigned int numberOfFrames);
|
||||
|
||||
int getEarliestFrameNumber() const { return _latestFrameNumber < static_cast<int>(_attributeMapList.size()) ? 0 : _latestFrameNumber - _attributeMapList.size() + 1; }
|
||||
int getEarliestFrameNumber() const { return _latestFrameNumber < static_cast<int>(_attributeMapList.size()) ? 0 : _latestFrameNumber - static_cast<int>(_attributeMapList.size()) + 1; }
|
||||
int getLatestFrameNumber() const { return _latestFrameNumber; }
|
||||
|
||||
typedef std::map<std::string, double> AttributeMap;
|
||||
@ -102,7 +102,7 @@ class OSG_EXPORT Stats : public osg::Referenced
|
||||
if (frameNumber < getEarliestFrameNumber()) return -1;
|
||||
|
||||
if (frameNumber >= _baseFrameNumber) return frameNumber - _baseFrameNumber;
|
||||
else return _attributeMapList.size() - (_baseFrameNumber-frameNumber);
|
||||
else return static_cast<int>(_attributeMapList.size()) - (_baseFrameNumber-frameNumber);
|
||||
}
|
||||
|
||||
std::string _name;
|
||||
|
@ -131,7 +131,7 @@ class OSG_EXPORT View : public virtual osg::Object
|
||||
|
||||
bool removeSlave(unsigned int pos);
|
||||
|
||||
unsigned int getNumSlaves() const { return _slaves.size(); }
|
||||
unsigned int getNumSlaves() const { return static_cast<unsigned int>(_slaves.size()); }
|
||||
|
||||
Slave& getSlave(unsigned int pos) { return _slaves[pos]; }
|
||||
const Slave& getSlave(unsigned int pos) const { return _slaves[pos]; }
|
||||
|
@ -180,8 +180,6 @@ class OSGVOLUME_EXPORT ScalarProperty : public Property
|
||||
{
|
||||
public:
|
||||
|
||||
ScalarProperty();
|
||||
|
||||
ScalarProperty(const std::string& scaleName, float value);
|
||||
|
||||
ScalarProperty(const ScalarProperty& scalarProperty,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
|
||||
@ -206,6 +204,8 @@ class OSGVOLUME_EXPORT ScalarProperty : public Property
|
||||
|
||||
virtual ~ScalarProperty() {}
|
||||
|
||||
ScalarProperty();
|
||||
|
||||
osg::ref_ptr<osg::Uniform> _uniform;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user