From eb0587b5fb27aae9bf54dd076a7087dd2fbfa185 Mon Sep 17 00:00:00 2001 From: Don BURNS Date: Mon, 18 Mar 2002 21:56:00 +0000 Subject: [PATCH] Changes required for SUN Solaris port... --- include/osg/GeoSet | 2 +- include/osg/Math | 2 +- include/osg/State | 8 +++++--- include/osgGLUT/Viewer | 2 +- include/osgUtil/Optimizer | 4 ++-- src/osg/Matrix.cpp | 2 +- 6 files changed, 11 insertions(+), 9 deletions(-) diff --git a/include/osg/GeoSet b/include/osg/GeoSet index 9af4e1748..f9ec3f775 100644 --- a/include/osg/GeoSet +++ b/include/osg/GeoSet @@ -243,7 +243,7 @@ class SG_EXPORT GeoSet : public Drawable /** set the colors and color indices of the geoset.*/ void setColors( Vec4 *cp, IndexPointer& ip ); /** set the color binding to the vertices/primitives/overall.*/ - void setColorBinding( BindingType binding ); + void setColorBinding( const BindingType binding ); inline BindingType getColorBinding() const { return _color_binding; } /** get the number of texture coords required by the defined primitives and textures binding.*/ diff --git a/include/osg/Math b/include/osg/Math index 80ef32d3f..1f9e2f6e9 100644 --- a/include/osg/Math +++ b/include/osg/Math @@ -7,7 +7,7 @@ #include -#if defined(WIN32) || defined (macintosh) +#if defined(WIN32) || defined (macintosh)|| defined (sun) #include diff --git a/include/osg/State b/include/osg/State index 73a17c79d..b5731531c 100644 --- a/include/osg/State +++ b/include/osg/State @@ -116,14 +116,18 @@ class SG_EXPORT State : public Referenced /** Get the DisplaySettings */ inline const DisplaySettings* getDisplaySettings() const { return _displaySettings.get(); } + typedef std::pair AttributePair; + typedef std::vector AttributeVec; + typedef std::vector ValueVec; + private: + unsigned int _contextID; ref_ptr _frameStamp; ref_ptr _camera; ref_ptr _displaySettings; - typedef std::vector ValueVec; struct ModeStack { @@ -141,8 +145,6 @@ class SG_EXPORT State : public Referenced }; - typedef std::pair AttributePair; - typedef std::vector AttributeVec; struct AttributeStack { diff --git a/include/osgGLUT/Viewer b/include/osgGLUT/Viewer index 297b0adb3..1a76fc2fd 100644 --- a/include/osgGLUT/Viewer +++ b/include/osgGLUT/Viewer @@ -92,6 +92,7 @@ class OSGGLUT_EXPORT Viewer : public Window, public osgUtil::GUIActionAdapter osg::DisplaySettings* getDisplaySettings() { return _displaySettings.get(); } const osg::DisplaySettings* getDisplaySettings() const { return _displaySettings.get(); } + typedef std::vector > CameraManipList; protected: @@ -109,7 +110,6 @@ class OSGGLUT_EXPORT Viewer : public Window, public osgUtil::GUIActionAdapter static Viewer* s_theViewer; - typedef std::vector > CameraManipList; struct ViewportDef { diff --git a/include/osgUtil/Optimizer b/include/osgUtil/Optimizer index 26ce5fc50..0777e572a 100644 --- a/include/osgUtil/Optimizer +++ b/include/osgUtil/Optimizer @@ -63,12 +63,12 @@ class OSGUTIL_EXPORT Optimizer void removeTransforms(); - protected: - typedef std::vector TransformStack; typedef std::vector MatrixStack; + protected: + struct TransformStruct { typedef std::set ObjectSet; diff --git a/src/osg/Matrix.cpp b/src/osg/Matrix.cpp index 6bb9f7951..5c837b3ae 100644 --- a/src/osg/Matrix.cpp +++ b/src/osg/Matrix.cpp @@ -34,7 +34,7 @@ Matrix::Matrix( const Matrix& other) : Object() set( (const float *) other._mat ); } -Matrix::Matrix( const float * def ) +Matrix::Matrix( const float * const def ) { set( def ); }