From Michael Platings, introduced osg::State::applyModelViewMaitrx(const osg::Matrix& matrix) method and associated osg::State::_modelViewCache to enable osgText::Text3D to be refactored in away that avoids creating/destroying matrices
This commit is contained in:
@@ -191,6 +191,7 @@ class OSG_EXPORT State : public Referenced, public Observer
|
||||
inline const osg::Matrix& getProjectionMatrix() const { return *_projection; }
|
||||
|
||||
void applyModelViewMatrix(const osg::RefMatrix* matrix);
|
||||
void applyModelViewMatrix(const osg::Matrix&);
|
||||
|
||||
const osg::Matrix& getModelViewMatrix() const { return *_modelView; }
|
||||
|
||||
@@ -1344,6 +1345,7 @@ class OSG_EXPORT State : public Referenced, public Observer
|
||||
ref_ptr<const RefMatrix> _initialViewMatrix;
|
||||
ref_ptr<const RefMatrix> _projection;
|
||||
ref_ptr<const RefMatrix> _modelView;
|
||||
ref_ptr<RefMatrix> _modelViewCache;
|
||||
|
||||
bool _useModelViewAndProjectionUniforms;
|
||||
ref_ptr<Uniform> _modelViewMatrixUniform;
|
||||
@@ -1647,6 +1649,8 @@ class OSG_EXPORT State : public Referenced, public Observer
|
||||
bool getLastAppliedMode(const ModeMap& modeMap,StateAttribute::GLMode mode) const;
|
||||
const StateAttribute* getLastAppliedAttribute(const AttributeMap& attributeMap,StateAttribute::Type type, unsigned int member) const;
|
||||
|
||||
void loadModelViewMatrix();
|
||||
|
||||
|
||||
mutable bool _isSecondaryColorSupportResolved;
|
||||
mutable bool _isSecondaryColorSupported;
|
||||
|
||||
Reference in New Issue
Block a user