Changeset 9599

Show
Ignore:
Timestamp:
01/30/09 11:55:28 (6 years ago)
Author:
robert
Message:

Fixed warnings, updated NEWS

Location:
OpenSceneGraph/trunk
Files:
18 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/NEWS.txt

    r9592 r9599  
    2323    * New VNC client widget support (based on libVNCServer)  
    2424    * New Browser client widget support (based on Gecko/UBrowser) 
     25    * New plugins for loading Half-Life 2 maps and models. 
    2526    * Improvements to DatabasePager tailored for low latency paging. 
    2627    * Improved stats collection and on screen reporting. 
    27     * Support for the OpenGL geometry instancing extension. 
     28    * Support for the OpenGL draw instanced extension. 
    2829    * Improvements to COLLADA support. 
    2930    * Build reporting using CDash 
  • OpenSceneGraph/trunk/include/osg/Array

    r8467 r9599  
    227227         
    228228        virtual const GLvoid*   getDataPointer() const { if (!this->empty()) return &this->front(); else return 0; } 
    229         virtual unsigned int    getTotalDataSize() const { return this->size()*sizeof(T); } 
    230         virtual unsigned int    getNumElements() const { return this->size(); } 
     229        virtual unsigned int    getTotalDataSize() const { return static_cast<unsigned int>(this->size()*sizeof(T)); } 
     230        virtual unsigned int    getNumElements() const { return static_cast<unsigned int>(this->size()); } 
    231231 
    232232        typedef T ElementDataType; // expose T 
     
    313313         
    314314        virtual const GLvoid*   getDataPointer() const { if (!this->empty()) return &this->front(); else return 0; } 
    315         virtual unsigned int    getTotalDataSize() const { return this->size()*sizeof(T); } 
    316         virtual unsigned int    getNumElements() const { return this->size(); } 
     315        virtual unsigned int    getTotalDataSize() const { return static_cast<unsigned int>(this->size()*sizeof(T)); } 
     316        virtual unsigned int    getNumElements() const { return static_cast<unsigned int>(this->size()); } 
    317317 
    318318        virtual unsigned int    index(unsigned int pos) const { return (*this)[pos]; } 
  • OpenSceneGraph/trunk/include/osg/Drawable

    r8880 r9599  
    155155         * @return the number of parents of this node. 
    156156         */ 
    157         inline unsigned int getNumParents() const { return _parents.size(); } 
     157        inline unsigned int getNumParents() const { return static_cast<unsigned int>(_parents.size()); } 
    158158 
    159159        /** Get the list of matrices that transform this node from local coordinates to world coordinates. 
  • OpenSceneGraph/trunk/include/osg/Geometry

    r8853 r9599  
    200200        const ArrayData& getTexCoordData(unsigned int index) const; 
    201201 
    202         unsigned int getNumTexCoordArrays() const {  return _texCoordList.size(); } 
     202        unsigned int getNumTexCoordArrays() const {  return static_cast<unsigned int>(_texCoordList.size()); } 
    203203        ArrayDataList& getTexCoordArrayList() { return _texCoordList; } 
    204204        const ArrayDataList& getTexCoordArrayList() const { return _texCoordList; } 
     
    220220        const ArrayData& getVertexAttribData(unsigned int index) const; 
    221221 
    222         unsigned int getNumVertexAttribArrays() const { return _vertexAttribList.size(); } 
     222        unsigned int getNumVertexAttribArrays() const { return static_cast<unsigned int>(_vertexAttribList.size()); } 
    223223        ArrayDataList& getVertexAttribArrayList() { return _vertexAttribList; } 
    224224        const ArrayDataList& getVertexAttribArrayList() const { return _vertexAttribList; } 
     
    232232        const PrimitiveSetList& getPrimitiveSetList() const { return _primitives; } 
    233233 
    234         unsigned int getNumPrimitiveSets() const { return _primitives.size(); } 
     234        unsigned int getNumPrimitiveSets() const { return static_cast<unsigned int>(_primitives.size()); } 
    235235        PrimitiveSet* getPrimitiveSet(unsigned int pos) { return _primitives[pos].get(); } 
    236236        const PrimitiveSet* getPrimitiveSet(unsigned int pos) const { return _primitives[pos].get(); } 
  • OpenSceneGraph/trunk/include/osg/Group

    r7648 r9599  
    9898 
    9999        /** Return the number of children nodes. */ 
    100         inline unsigned int getNumChildren() const { return _children.size(); } 
     100        inline unsigned int getNumChildren() const { return static_cast<unsigned int>(_children.size()); } 
    101101 
    102102        /** Set child node at position i. 
     
    140140                if (_children[childNum]==node) return childNum; 
    141141            } 
    142             return _children.size(); // node not found. 
     142            return static_cast<unsigned int>(_children.size()); // node not found. 
    143143        } 
    144144 
  • OpenSceneGraph/trunk/include/osg/Image

    r9388 r9599  
    274274        unsigned int getNumMipmapLevels() const 
    275275        { 
    276             return _mipmapData.size()+1; 
     276            return static_cast<unsigned int>(_mipmapData.size())+1; 
    277277        }; 
    278278 
  • OpenSceneGraph/trunk/include/osg/KdTree

    r9377 r9599  
    132132        int addNode(const KdNode& node) 
    133133        { 
    134             int num = _kdNodes.size();  
     134            int num = static_cast<int>(_kdNodes.size());  
    135135            _kdNodes.push_back(node);  
    136136            return num; 
     
    148148        unsigned int addTriangle(const Triangle& tri) 
    149149        { 
    150             unsigned int num = _triangles.size(); 
     150            unsigned int num = static_cast<unsigned int>(_triangles.size()); 
    151151            _triangles.push_back(tri); 
    152152            return num; 
  • OpenSceneGraph/trunk/include/osg/Node

    r9326 r9599  
    145145         * @return the number of parents of this node. 
    146146         */ 
    147         inline unsigned int getNumParents() const { return _parents.size(); } 
     147        inline unsigned int getNumParents() const { return static_cast<unsigned int>(_parents.size()); } 
    148148 
    149149        /** Get the list of node paths parent paths. 
     
    280280 
    281281        /** Get the number of descriptions of the node.*/ 
    282         inline unsigned int getNumDescriptions() const { return _descriptions.size(); } 
     282        inline unsigned int getNumDescriptions() const { return static_cast<unsigned int>(_descriptions.size()); } 
    283283 
    284284        /** Add a description string to the node.*/ 
  • OpenSceneGraph/trunk/include/osg/OperationThread

    r7809 r9599  
    109109         
    110110        /** Return the num of pending operations that are sitting in the OperationQueue.*/ 
    111         unsigned int getNumOperationsInQueue() const { return _operations.size(); } 
     111        unsigned int getNumOperationsInQueue() const { return static_cast<unsigned int>(_operations.size()); } 
    112112 
    113113        /** Add operation to end of OperationQueue, this will be  
  • OpenSceneGraph/trunk/include/osg/PrimitiveSet

    r9447 r9599  
    317317        virtual void accept(PrimitiveIndexFunctor& functor) const; 
    318318         
    319         virtual unsigned int getNumIndices() const { return _count; } 
    320         virtual unsigned int index(unsigned int pos) const { return _first+pos; } 
     319        virtual unsigned int getNumIndices() const { return static_cast<unsigned int>(_count); } 
     320        virtual unsigned int index(unsigned int pos) const { return static_cast<unsigned int>(_first)+pos; } 
    321321        virtual void offsetIndices(int offset) { _first += offset; } 
    322322 
     
    494494 
    495495        virtual const GLvoid*   getDataPointer() const { return empty()?0:&front(); } 
    496         virtual unsigned int    getTotalDataSize() const { return size(); } 
     496        virtual unsigned int    getTotalDataSize() const { return static_cast<unsigned int>(size()); } 
    497497        virtual bool            supportsBufferObject() const { return false; } 
    498498 
     
    502502        virtual void accept(PrimitiveIndexFunctor& functor) const; 
    503503 
    504         virtual unsigned int getNumIndices() const { return size(); } 
     504        virtual unsigned int getNumIndices() const { return static_cast<unsigned int>(size()); } 
    505505        virtual unsigned int index(unsigned int pos) const { return (*this)[pos]; } 
    506506        virtual void offsetIndices(int offset); 
     
    569569 
    570570        virtual const GLvoid*   getDataPointer() const { return empty()?0:&front(); } 
    571         virtual unsigned int    getTotalDataSize() const { return 2*size(); } 
     571        virtual unsigned int    getTotalDataSize() const { return 2u*static_cast<unsigned int>(size()); } 
    572572        virtual bool            supportsBufferObject() const { return false; } 
    573573 
     
    577577        virtual void accept(PrimitiveIndexFunctor& functor) const; 
    578578 
    579         virtual unsigned int getNumIndices() const { return size(); } 
     579        virtual unsigned int getNumIndices() const { return static_cast<unsigned int>(size()); } 
    580580        virtual unsigned int index(unsigned int pos) const { return (*this)[pos]; } 
    581581        virtual void offsetIndices(int offset); 
     
    643643 
    644644        virtual const GLvoid*   getDataPointer() const { return empty()?0:&front(); } 
    645         virtual unsigned int    getTotalDataSize() const { return 4*size(); } 
     645        virtual unsigned int    getTotalDataSize() const { return 4u*static_cast<unsigned int>(size()); } 
    646646        virtual bool            supportsBufferObject() const { return false; } 
    647647 
     
    651651        virtual void accept(PrimitiveIndexFunctor& functor) const; 
    652652 
    653         virtual unsigned int getNumIndices() const { return size(); } 
     653        virtual unsigned int getNumIndices() const { return static_cast<unsigned int>(size()); } 
    654654        virtual unsigned int index(unsigned int pos) const { return (*this)[pos]; } 
    655655        virtual void offsetIndices(int offset); 
  • OpenSceneGraph/trunk/include/osg/Program

    r8456 r9599  
    8484        bool addShader( Shader* shader ); 
    8585 
    86         unsigned int getNumShaders() const { return _shaderList.size(); } 
     86        unsigned int getNumShaders() const { return static_cast<unsigned int>(_shaderList.size()); } 
    8787 
    8888        Shader* getShader( unsigned int i ) { return _shaderList[i].get(); } 
  • OpenSceneGraph/trunk/include/osg/Shape

    r9561 r9599  
    610610 
    611611        /** Get the number of children of this composite shape.*/ 
    612         unsigned int getNumChildren() const { return _children.size(); } 
     612        unsigned int getNumChildren() const { return static_cast<unsigned int>(_children.size()); } 
    613613 
    614614        /** Get a child.*/ 
     
    632632                if (_children[childNo]==shape) return childNo; 
    633633            } 
    634             return _children.size(); // node not found. 
     634            return static_cast<unsigned int>(_children.size()); // node not found. 
    635635 
    636636        } 
  • OpenSceneGraph/trunk/include/osg/State

    r9549 r9599  
    135135         
    136136        /** Get the number of StateSet's on the StateSet stack.*/ 
    137         unsigned int getStateSetStackSize() { return _stateStateStack.size(); } 
     137        unsigned int getStateSetStackSize() { return static_cast<unsigned int>(_stateStateStack.size()); } 
    138138         
    139139        /** Pop StateSet's for the StateSet stack till its size equals the specified size.*/ 
  • OpenSceneGraph/trunk/include/osg/StateAttribute

    r8655 r9599  
    257257         * @return the number of parents of this StateAttribute. 
    258258         */ 
    259         inline unsigned int getNumParents() const { return _parents.size(); } 
     259        inline unsigned int getNumParents() const { return static_cast<unsigned int>(_parents.size()); } 
    260260 
    261261 
  • OpenSceneGraph/trunk/include/osg/StateSet

    r8455 r9599  
    9090         * @return the number of parents of this StateSet. 
    9191         */ 
    92         inline unsigned int getNumParents() const { return _parents.size(); } 
     92        inline unsigned int getNumParents() const { return static_cast<unsigned int>(_parents.size()); } 
    9393 
    9494 
  • OpenSceneGraph/trunk/include/osg/Stats

    r6202 r9599  
    3939        void allocate(unsigned int numberOfFrames); 
    4040         
    41         int getEarliestFrameNumber() const { return _latestFrameNumber < static_cast<int>(_attributeMapList.size()) ? 0 : _latestFrameNumber - _attributeMapList.size() + 1; } 
     41        int getEarliestFrameNumber() const { return _latestFrameNumber < static_cast<int>(_attributeMapList.size()) ? 0 : _latestFrameNumber - static_cast<int>(_attributeMapList.size()) + 1; } 
    4242        int getLatestFrameNumber() const { return _latestFrameNumber; } 
    4343         
     
    103103             
    104104            if (frameNumber >= _baseFrameNumber) return frameNumber - _baseFrameNumber; 
    105             else return _attributeMapList.size() - (_baseFrameNumber-frameNumber); 
     105            else return static_cast<int>(_attributeMapList.size()) - (_baseFrameNumber-frameNumber); 
    106106        } 
    107107 
  • OpenSceneGraph/trunk/include/osg/View

    r9554 r9599  
    132132        bool removeSlave(unsigned int pos); 
    133133 
    134         unsigned int getNumSlaves() const { return _slaves.size(); } 
     134        unsigned int getNumSlaves() const { return static_cast<unsigned int>(_slaves.size()); } 
    135135 
    136136        Slave& getSlave(unsigned int pos) { return _slaves[pos]; } 
  • OpenSceneGraph/trunk/include/osgVolume/Property

    r9534 r9599  
    181181    public: 
    182182 
    183         ScalarProperty(); 
    184  
    185183        ScalarProperty(const std::string& scaleName, float value); 
    186184         
     
    207205        virtual ~ScalarProperty() {} 
    208206         
     207        ScalarProperty(); 
     208 
    209209        osg::ref_ptr<osg::Uniform>  _uniform; 
    210210};