From 7fc714ada1982291af0b5d9210e7688d0d19c387 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 28 Mar 2007 11:30:38 +0000 Subject: [PATCH] Removed deprecated drawImplementation(State&) method from Drawable and Drawable::DrawCallback --- examples/osgcallback/osgcallback.cpp | 4 ++-- examples/osgcegui/osgcegui.cpp | 6 +++-- examples/osgspacewarp/osgspacewarp.cpp | 5 ++-- examples/osgteapot/osgteapot.cpp | 2 +- include/osg/DrawPixels | 2 +- include/osg/Drawable | 16 ++++--------- include/osg/Geometry | 2 +- include/osg/ShapeDrawable | 2 +- include/osgParticle/ConnectedParticleSystem | 2 +- include/osgParticle/ParticleSystem | 2 +- include/osgSim/ImpostorSprite | 2 +- src/osg/DrawPixels.cpp | 2 +- src/osg/Geometry.cpp | 6 +++-- src/osg/ShapeDrawable.cpp | 4 +++- src/osgParticle/ConnectedParticleSystem.cpp | 4 +++- src/osgParticle/ParticleSystem.cpp | 4 +++- src/osgPlugins/logo/ReaderWriterLOGO.cpp | 4 ++-- src/osgSim/ImpostorSprite.cpp | 2 +- src/osgSim/LightPointDrawable.cpp | 3 ++- src/osgSim/LightPointDrawable.h | 2 +- src/osgSim/LightPointSpriteDrawable.cpp | 5 ++-- src/osgSim/LightPointSpriteDrawable.h | 2 +- src/osgSim/SphereSegment.cpp | 24 +++++++++---------- src/osgWrappers/osg/DrawPixels.cpp | 10 ++++---- src/osgWrappers/osg/Drawable.cpp | 16 +++---------- src/osgWrappers/osg/Geometry.cpp | 6 ++--- src/osgWrappers/osg/ShapeDrawable.cpp | 6 ++--- .../osgParticle/ConnectedParticleSystem.cpp | 6 ++--- .../osgParticle/ParticleSystem.cpp | 10 ++++---- .../osgParticle/PrecipitationEffect.cpp | 2 +- src/osgWrappers/osgSim/ImpostorSprite.cpp | 6 ++--- 31 files changed, 83 insertions(+), 86 deletions(-) diff --git a/examples/osgcallback/osgcallback.cpp b/examples/osgcallback/osgcallback.cpp index cc7dadef3..eee678abb 100644 --- a/examples/osgcallback/osgcallback.cpp +++ b/examples/osgcallback/osgcallback.cpp @@ -39,10 +39,10 @@ class CullCallback : public osg::NodeCallback class DrawableDrawCallback : public osg::Drawable::DrawCallback { - virtual void drawImplementation(osg::State& state,const osg::Drawable* drawable) const + virtual void drawImplementation(osg::RenderInfo& renderInfo,const osg::Drawable* drawable) const { std::cout<<"draw call back - pre drawImplementation"<drawImplementation(state); + drawable->drawImplementation(renderInfo); std::cout<<"draw call back - post drawImplementation"<drawImplementation(state); + drawable->drawImplementation(renderInfo); } mutable bool _firstTime; diff --git a/examples/osgteapot/osgteapot.cpp b/examples/osgteapot/osgteapot.cpp index df0665517..75673ab47 100644 --- a/examples/osgteapot/osgteapot.cpp +++ b/examples/osgteapot/osgteapot.cpp @@ -215,7 +215,7 @@ class Teapot : public osg::Drawable // the draw immediate mode method is where the OSG wraps up the drawing of // of OpenGL primitives. - virtual void drawImplementation(osg::State&) const + virtual void drawImplementation(osg::RenderInfo&) const { // teapot(..) doens't use vertex arrays at all so we don't need to toggle their state // if we did we'd need to something like following call diff --git a/include/osg/DrawPixels b/include/osg/DrawPixels index cf39a47e4..eb6e68072 100644 --- a/include/osg/DrawPixels +++ b/include/osg/DrawPixels @@ -57,7 +57,7 @@ class OSG_EXPORT DrawPixels : public Drawable void setSubImageDimensions(unsigned int offsetX,unsigned int offsetY,unsigned int width,unsigned int height); void getSubImageDimensions(unsigned int& offsetX,unsigned int& offsetY,unsigned int& width,unsigned int& height) const; - virtual void drawImplementation(State& state) const; + virtual void drawImplementation(RenderInfo& state) const; virtual BoundingBox computeBound() const; diff --git a/include/osg/Drawable b/include/osg/Drawable index bb8861d4e..deb149d90 100644 --- a/include/osg/Drawable +++ b/include/osg/Drawable @@ -404,11 +404,8 @@ class OSG_EXPORT Drawable : public Object META_Object(osg,DrawCallback); - /** Deprecated.*/ - virtual void drawImplementation(osg::State&,const osg::Drawable*) const {} - /** do customized draw code.*/ - virtual void drawImplementation(osg::RenderInfo& renderInfo,const osg::Drawable* drawable) const { drawImplementation(*renderInfo.getState(), drawable); } + virtual void drawImplementation(osg::RenderInfo& /*renderInfo*/,const osg::Drawable* /*drawable*/) const {} }; /** Set the DrawCallback which allows users to attach customize the drawing of existing Drawable object.*/ @@ -420,15 +417,12 @@ class OSG_EXPORT Drawable : public Object /** Get the const DrawCallback.*/ const DrawCallback* getDrawCallback() const { return _drawCallback.get(); } - /** Deprecated. */ - virtual void drawImplementation(State&) const {} - - /** drawImplementation(State&) is a pure virtual method for the actual implementation of OpenGL drawing calls, such as vertex arrays and primitives, that + /** drawImplementation(RenderInfo&) is a pure virtual method for the actual implementation of OpenGL drawing calls, such as vertex arrays and primitives, that * must be implemented in concrete subclasses of the Drawable base class, examples include osg::Geometry and osg::ShapeDrawable. - * drawImplementation(State&) is called from the draw(State&) method, with the draw method handling management of OpenGL display lists, - * and drawImplementation(State&) handling the actuall drawing itself. + * drawImplementation(RenderInfo&) is called from the draw(RenderInfo&) method, with the draw method handling management of OpenGL display lists, + * and drawImplementation(RenderInfo&) handling the actuall drawing itself. * @param state The osg::State object that encapulates the current OpenGL state for the current graphics context. */ - virtual void drawImplementation(RenderInfo& renderInfo) const { drawImplementation(*renderInfo.getState()); } + virtual void drawImplementation(RenderInfo& renderInfo) const = 0; /** Return a OpenGL display list handle a newly generated or reused from display list cache. */ diff --git a/include/osg/Geometry b/include/osg/Geometry index 499d918ab..2941c0be9 100644 --- a/include/osg/Geometry +++ b/include/osg/Geometry @@ -336,7 +336,7 @@ class OSG_EXPORT Geometry : public Drawable * This is the internal draw method which does the drawing itself, * and is the method to override when deriving from Geometry for user-drawn objects. */ - virtual void drawImplementation(State& state) const; + virtual void drawImplementation(RenderInfo& renderInfo) const; /** Return true, osg::Geometry does support accept(Drawable::AttributeFunctor&). */ virtual bool supports(const Drawable::AttributeFunctor&) const { return true; } diff --git a/include/osg/ShapeDrawable b/include/osg/ShapeDrawable index e99f59bb9..c6ca6d4f0 100644 --- a/include/osg/ShapeDrawable +++ b/include/osg/ShapeDrawable @@ -160,7 +160,7 @@ class OSG_EXPORT ShapeDrawable : public Drawable * drawing itself, and is the method to override when deriving from * ShapeDrawable for user-drawn objects. */ - virtual void drawImplementation(State& state) const; + virtual void drawImplementation(RenderInfo& renderInfo) const; /* Not all virtual overloads of these methods are overridden in this class, so bring the base class implementation in to avoid hiding the non-used ones. */ diff --git a/include/osgParticle/ConnectedParticleSystem b/include/osgParticle/ConnectedParticleSystem index 9187722f3..5df957204 100644 --- a/include/osgParticle/ConnectedParticleSystem +++ b/include/osgParticle/ConnectedParticleSystem @@ -39,7 +39,7 @@ namespace osgParticle virtual void reuseParticle(int i); /// Draw the connected particles as either a line or a quad strip, depending upon viewing distance. . - virtual void drawImplementation(osg::State& state) const; + virtual void drawImplementation(osg::RenderInfo& renderInfo) const; ///Get the (const) particle from where the line or quadstrip starts to be drawn const osgParticle::Particle* getStartParticle() const diff --git a/include/osgParticle/ParticleSystem b/include/osgParticle/ParticleSystem index 79d8d63fd..c8b9f0837 100644 --- a/include/osgParticle/ParticleSystem +++ b/include/osgParticle/ParticleSystem @@ -162,7 +162,7 @@ namespace osgParticle /// Update the particles. Don't call this directly, use a ParticleSystemUpdater instead. virtual void update(double dt); - virtual void drawImplementation(osg::State& state) const; + virtual void drawImplementation(osg::RenderInfo& renderInfo) const; virtual osg::BoundingBox computeBound() const; diff --git a/include/osgSim/ImpostorSprite b/include/osgSim/ImpostorSprite index 5e41bd582..2b33ceab4 100644 --- a/include/osgSim/ImpostorSprite +++ b/include/osgSim/ImpostorSprite @@ -126,7 +126,7 @@ class OSGSIM_EXPORT ImpostorSprite : public osg::Drawable int t() const { return _t; } /** Draw ImpostorSprite directly. */ - virtual void drawImplementation(osg::State& state) const; + virtual void drawImplementation(osg::RenderInfo& renderInfo) const; /** Return true, osg::ImpostorSprite does support accept(Drawable::AttributeFunctor&). */ virtual bool supports(const Drawable::AttributeFunctor&) const { return true; } diff --git a/src/osg/DrawPixels.cpp b/src/osg/DrawPixels.cpp index 0a56814a8..a8d81a895 100644 --- a/src/osg/DrawPixels.cpp +++ b/src/osg/DrawPixels.cpp @@ -88,7 +88,7 @@ BoundingBox DrawPixels::computeBound() const return bbox; } -void DrawPixels::drawImplementation(State&) const +void DrawPixels::drawImplementation(RenderInfo&) const { glRasterPos3f(_position.x(),_position.y(),_position.z()); diff --git a/src/osg/Geometry.cpp b/src/osg/Geometry.cpp index 1508cfec0..6b5ddff06 100644 --- a/src/osg/Geometry.cpp +++ b/src/osg/Geometry.cpp @@ -876,14 +876,16 @@ unsigned int Geometry::getGLObjectSizeHint() const return totalSize; } -void Geometry::drawImplementation(State& state) const +void Geometry::drawImplementation(RenderInfo& renderInfo) const { + State& state = *renderInfo.getState(); + // osg::notify(osg::NOTICE)<<"Geometry::drawImplementation"<drawImplementation(state); + _internalOptimizedGeometry->drawImplementation(renderInfo); return; } diff --git a/src/osg/ShapeDrawable.cpp b/src/osg/ShapeDrawable.cpp index d18e14834..92a1fe1ec 100644 --- a/src/osg/ShapeDrawable.cpp +++ b/src/osg/ShapeDrawable.cpp @@ -1785,8 +1785,10 @@ void ShapeDrawable::setTessellationHints(TessellationHints* hints) } } -void ShapeDrawable::drawImplementation(State& state) const +void ShapeDrawable::drawImplementation(RenderInfo& renderInfo) const { + osg::State& state = *renderInfo.getState(); + if (_shape.valid()) { glColor4fv(_color.ptr()); diff --git a/src/osgParticle/ConnectedParticleSystem.cpp b/src/osgParticle/ConnectedParticleSystem.cpp index f166473ef..2c673eb1b 100644 --- a/src/osgParticle/ConnectedParticleSystem.cpp +++ b/src/osgParticle/ConnectedParticleSystem.cpp @@ -112,8 +112,10 @@ void ConnectedParticleSystem::reuseParticle(int particleIndex) } -void ConnectedParticleSystem::drawImplementation(osg::State& state) const +void ConnectedParticleSystem::drawImplementation(osg::RenderInfo& renderInfo) const { + osg::State& state = *renderInfo.getState(); + OpenThreads::ScopedReadLock lock(_readWriteMutex); const Particle* particle = (_startParticle != Particle::INVALID_INDEX) ? &_particles[_startParticle] : 0; diff --git a/src/osgParticle/ParticleSystem.cpp b/src/osgParticle/ParticleSystem.cpp index 65c2f2511..c6d02ed2b 100644 --- a/src/osgParticle/ParticleSystem.cpp +++ b/src/osgParticle/ParticleSystem.cpp @@ -89,8 +89,10 @@ void osgParticle::ParticleSystem::update(double dt) dirtyBound(); } -void osgParticle::ParticleSystem::drawImplementation(osg::State& state) const +void osgParticle::ParticleSystem::drawImplementation(osg::RenderInfo& renderInfo) const { + osg::State& state = *renderInfo.getState(); + OpenThreads::ScopedReadLock lock(_readWriteMutex); // update the frame count, so other objects can detect when diff --git a/src/osgPlugins/logo/ReaderWriterLOGO.cpp b/src/osgPlugins/logo/ReaderWriterLOGO.cpp index a64b4da18..547699ca2 100644 --- a/src/osgPlugins/logo/ReaderWriterLOGO.cpp +++ b/src/osgPlugins/logo/ReaderWriterLOGO.cpp @@ -84,9 +84,9 @@ class Logos: public osg::Drawable virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } virtual const char* className() const { return "Logos"; } - virtual void drawImplementation(osg::State &state ) const + virtual void drawImplementation(osg::RenderInfo& renderInfo) const { - if( state.getContextID() != _contextID ) + if( renderInfo.getContextID() != _contextID ) return; diff --git a/src/osgSim/ImpostorSprite.cpp b/src/osgSim/ImpostorSprite.cpp index 59d0d699f..0f4b07832 100644 --- a/src/osgSim/ImpostorSprite.cpp +++ b/src/osgSim/ImpostorSprite.cpp @@ -79,7 +79,7 @@ float ImpostorSprite::calcPixelError(const osg::Matrix& MVPW) const return sqrtf(max_error_sqrd); } -void ImpostorSprite::drawImplementation(osg::State&) const +void ImpostorSprite::drawImplementation(osg::RenderInfo&) const { // when the tex env is set to REPLACE, and the // texture is set up correctly the color has no effect. diff --git a/src/osgSim/LightPointDrawable.cpp b/src/osgSim/LightPointDrawable.cpp index 3168aab05..c11997a05 100644 --- a/src/osgSim/LightPointDrawable.cpp +++ b/src/osgSim/LightPointDrawable.cpp @@ -82,8 +82,9 @@ void LightPointDrawable::reset() } -void LightPointDrawable::drawImplementation(osg::State& state) const +void LightPointDrawable::drawImplementation(osg::RenderInfo& renderInfo) const { + osg::State& state = *renderInfo.getState(); state.applyMode(GL_POINT_SMOOTH,true); state.applyMode(GL_BLEND,true); diff --git a/src/osgSim/LightPointDrawable.h b/src/osgSim/LightPointDrawable.h index 374fd3602..b0251db7d 100644 --- a/src/osgSim/LightPointDrawable.h +++ b/src/osgSim/LightPointDrawable.h @@ -80,7 +80,7 @@ class OSGSIM_EXPORT LightPointDrawable : public osg::Drawable } /** draw LightPoints. */ - virtual void drawImplementation(osg::State& state) const; + virtual void drawImplementation(osg::RenderInfo& renderInfo) const; void setSimulationTime(double time) diff --git a/src/osgSim/LightPointSpriteDrawable.cpp b/src/osgSim/LightPointSpriteDrawable.cpp index fcc4f8565..634028a0b 100644 --- a/src/osgSim/LightPointSpriteDrawable.cpp +++ b/src/osgSim/LightPointSpriteDrawable.cpp @@ -28,12 +28,13 @@ LightPointSpriteDrawable::LightPointSpriteDrawable(const LightPointSpriteDrawabl { } -void LightPointSpriteDrawable::drawImplementation(osg::State& state) const +void LightPointSpriteDrawable::drawImplementation(osg::RenderInfo& renderInfo) const { + osg::State& state = *renderInfo.getState(); if (!state.getModeValidity(GL_POINT_SPRITE_ARB)) { - LightPointDrawable::drawImplementation(state); + LightPointDrawable::drawImplementation(renderInfo); return; } diff --git a/src/osgSim/LightPointSpriteDrawable.h b/src/osgSim/LightPointSpriteDrawable.h index 44cd84c7c..d4dc9e9c0 100644 --- a/src/osgSim/LightPointSpriteDrawable.h +++ b/src/osgSim/LightPointSpriteDrawable.h @@ -39,7 +39,7 @@ class OSGSIM_EXPORT LightPointSpriteDrawable : public osgSim::LightPointDrawable /** draw LightPoints. */ - virtual void drawImplementation(osg::State& state) const; + virtual void drawImplementation(osg::RenderInfo& renderInfo) const; protected: diff --git a/src/osgSim/SphereSegment.cpp b/src/osgSim/SphereSegment.cpp index 57c6bff12..529104dda 100644 --- a/src/osgSim/SphereSegment.cpp +++ b/src/osgSim/SphereSegment.cpp @@ -53,7 +53,7 @@ public: META_Object(osgSim,Surface) - void drawImplementation(osg::State& state) const; + void drawImplementation(osg::RenderInfo& renderInfo) const; virtual osg::BoundingBox computeBound() const; @@ -64,9 +64,9 @@ private: SphereSegment* _ss; }; -void SphereSegment::Surface::drawImplementation(osg::State& state) const +void SphereSegment::Surface::drawImplementation(osg::RenderInfo& renderInfo) const { - _ss->Surface_drawImplementation(state); + _ss->Surface_drawImplementation(*renderInfo.getState()); } osg:: BoundingBox SphereSegment::Surface::computeBound() const @@ -101,7 +101,7 @@ public: META_Object(osgSim,EdgeLine) - void drawImplementation(osg::State& state) const; + void drawImplementation(osg::RenderInfo& renderInfo) const; protected: @@ -121,9 +121,9 @@ private: SphereSegment* _ss; }; -void SphereSegment::EdgeLine::drawImplementation(osg::State& state) const +void SphereSegment::EdgeLine::drawImplementation(osg::RenderInfo& renderInfo) const { - _ss->EdgeLine_drawImplementation(state); + _ss->EdgeLine_drawImplementation(*renderInfo.getState()); } osg::BoundingBox SphereSegment::EdgeLine::computeBound() const @@ -159,7 +159,7 @@ public: META_Object(osgSim,Side) - void drawImplementation(osg::State& state) const; + void drawImplementation(osg::RenderInfo& renderInfo) const; protected: @@ -172,9 +172,9 @@ private: }; -void SphereSegment::Side::drawImplementation(osg::State& state) const +void SphereSegment::Side::drawImplementation(osg::RenderInfo& renderInfo) const { - _ss->Side_drawImplementation(state, _planeOrientation, _BoundaryAngle); + _ss->Side_drawImplementation(*renderInfo.getState(), _planeOrientation, _BoundaryAngle); } osg::BoundingBox SphereSegment::Side::computeBound() const @@ -210,7 +210,7 @@ public: META_Object(osgSim,Spoke) - void drawImplementation(osg::State& state) const; + void drawImplementation(osg::RenderInfo& renderInfo) const; protected: @@ -229,9 +229,9 @@ private: SphereSegment::BoundaryAngle _azAngle, _elevAngle; }; -void SphereSegment::Spoke::drawImplementation(osg::State& state) const +void SphereSegment::Spoke::drawImplementation(osg::RenderInfo& renderInfo) const { - _ss->Spoke_drawImplementation(state, _azAngle, _elevAngle); + _ss->Spoke_drawImplementation(*renderInfo.getState(), _azAngle, _elevAngle); } osg::BoundingBox SphereSegment::Spoke::computeBound() const diff --git a/src/osgWrappers/osg/DrawPixels.cpp b/src/osgWrappers/osg/DrawPixels.cpp index e45557ac8..f60a0d9a7 100644 --- a/src/osgWrappers/osg/DrawPixels.cpp +++ b/src/osgWrappers/osg/DrawPixels.cpp @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include // Must undefine IN and OUT macros defined in Windows headers @@ -110,11 +110,11 @@ BEGIN_OBJECT_REFLECTOR(osg::DrawPixels) __void__getSubImageDimensions__unsigned_int_R1__unsigned_int_R1__unsigned_int_R1__unsigned_int_R1, "", ""); - I_Method1(void, drawImplementation, IN, osg::State &, state, + I_Method1(void, drawImplementation, IN, osg::RenderInfo &, state, Properties::VIRTUAL, - __void__drawImplementation__State_R1, - "Deprecated. ", - ""); + __void__drawImplementation__RenderInfo_R1, + "drawImplementation(RenderInfo&) is a pure virtual method for the actual implementation of OpenGL drawing calls, such as vertex arrays and primitives, that must be implemented in concrete subclasses of the Drawable base class, examples include osg::Geometry and osg::ShapeDrawable. ", + " param state The osg::State object that encapulates the current OpenGL state for the current graphics context. "); I_Method0(osg::BoundingBox, computeBound, Properties::VIRTUAL, __BoundingBox__computeBound, diff --git a/src/osgWrappers/osg/Drawable.cpp b/src/osgWrappers/osg/Drawable.cpp index af6ae6e83..dd5e3e590 100644 --- a/src/osgWrappers/osg/Drawable.cpp +++ b/src/osgWrappers/osg/Drawable.cpp @@ -338,15 +338,10 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osg::Drawable) __C5_DrawCallback_P1__getDrawCallback, "Get the const DrawCallback. ", ""); - I_Method1(void, drawImplementation, IN, osg::State &, x, - Properties::VIRTUAL, - __void__drawImplementation__State_R1, - "Deprecated. ", - ""); I_Method1(void, drawImplementation, IN, osg::RenderInfo &, renderInfo, - Properties::VIRTUAL, + Properties::PURE_VIRTUAL, __void__drawImplementation__RenderInfo_R1, - "drawImplementation(State&) is a pure virtual method for the actual implementation of OpenGL drawing calls, such as vertex arrays and primitives, that must be implemented in concrete subclasses of the Drawable base class, examples include osg::Geometry and osg::ShapeDrawable. ", + "drawImplementation(RenderInfo&) is a pure virtual method for the actual implementation of OpenGL drawing calls, such as vertex arrays and primitives, that must be implemented in concrete subclasses of the Drawable base class, examples include osg::Geometry and osg::ShapeDrawable. ", " param state The osg::State object that encapulates the current OpenGL state for the current graphics context. "); I_Method1(bool, supports, IN, const osg::Drawable::AttributeFunctor &, x, Properties::VIRTUAL, @@ -767,12 +762,7 @@ BEGIN_OBJECT_REFLECTOR(osg::Drawable::DrawCallback) __C5_char_P1__className, "return the name of the object's class type. ", "Must be defined by derived classes. "); - I_Method2(void, drawImplementation, IN, osg::State &, x, IN, const osg::Drawable *, x, - Properties::VIRTUAL, - __void__drawImplementation__osg_State_R1__C5_osg_Drawable_P1, - "Deprecated. ", - ""); - I_Method2(void, drawImplementation, IN, osg::RenderInfo &, renderInfo, IN, const osg::Drawable *, drawable, + I_Method2(void, drawImplementation, IN, osg::RenderInfo &, x, IN, const osg::Drawable *, x, Properties::VIRTUAL, __void__drawImplementation__osg_RenderInfo_R1__C5_osg_Drawable_P1, "do customized draw code. ", diff --git a/src/osgWrappers/osg/Geometry.cpp b/src/osgWrappers/osg/Geometry.cpp index 415e5390a..bfa915651 100644 --- a/src/osgWrappers/osg/Geometry.cpp +++ b/src/osgWrappers/osg/Geometry.cpp @@ -16,7 +16,7 @@ #include #include #include -#include +#include // Must undefine IN and OUT macros defined in Windows headers #ifdef IN @@ -617,9 +617,9 @@ BEGIN_OBJECT_REFLECTOR(osg::Geometry) __unsigned_int__getGLObjectSizeHint, "Return the estimated size of GLObjects (display lists/vertex buffer objects) that are associated with this drawable. ", "This size is used a hint for reuse of deleteed display lists/vertex buffer objects. "); - I_Method1(void, drawImplementation, IN, osg::State &, state, + I_Method1(void, drawImplementation, IN, osg::RenderInfo &, renderInfo, Properties::VIRTUAL, - __void__drawImplementation__State_R1, + __void__drawImplementation__RenderInfo_R1, "Draw Geometry directly ignoring an OpenGL display list which could be attached. ", "This is the internal draw method which does the drawing itself, and is the method to override when deriving from Geometry for user-drawn objects."); I_Method1(bool, supports, IN, const osg::Drawable::AttributeFunctor &, x, diff --git a/src/osgWrappers/osg/ShapeDrawable.cpp b/src/osgWrappers/osg/ShapeDrawable.cpp index 118eb1646..cd7aa5022 100644 --- a/src/osgWrappers/osg/ShapeDrawable.cpp +++ b/src/osgWrappers/osg/ShapeDrawable.cpp @@ -15,9 +15,9 @@ #include #include #include +#include #include #include -#include #include // Must undefine IN and OUT macros defined in Windows headers @@ -91,9 +91,9 @@ BEGIN_OBJECT_REFLECTOR(osg::ShapeDrawable) __C5_TessellationHints_P1__getTessellationHints, "", ""); - I_Method1(void, drawImplementation, IN, osg::State &, state, + I_Method1(void, drawImplementation, IN, osg::RenderInfo &, renderInfo, Properties::VIRTUAL, - __void__drawImplementation__State_R1, + __void__drawImplementation__RenderInfo_R1, "Draw ShapeDrawable directly ignoring an OpenGL display list which could be attached. ", "This is the internal draw method which does the drawing itself, and is the method to override when deriving from ShapeDrawable for user-drawn objects."); I_Method1(bool, supports, IN, const osg::Drawable::AttributeFunctor &, x, diff --git a/src/osgWrappers/osgParticle/ConnectedParticleSystem.cpp b/src/osgWrappers/osgParticle/ConnectedParticleSystem.cpp index 8ad94f510..430d329e4 100644 --- a/src/osgWrappers/osgParticle/ConnectedParticleSystem.cpp +++ b/src/osgWrappers/osgParticle/ConnectedParticleSystem.cpp @@ -12,7 +12,7 @@ #include #include -#include +#include #include #include @@ -68,9 +68,9 @@ BEGIN_OBJECT_REFLECTOR(osgParticle::ConnectedParticleSystem) __void__reuseParticle__int, "Reuse the i-th particle. ", ""); - I_Method1(void, drawImplementation, IN, osg::State &, state, + I_Method1(void, drawImplementation, IN, osg::RenderInfo &, renderInfo, Properties::VIRTUAL, - __void__drawImplementation__osg_State_R1, + __void__drawImplementation__osg_RenderInfo_R1, "Draw the connected particles as either a line or a quad strip, depending upon viewing distance. . ", ""); I_Method0(const osgParticle::Particle *, getStartParticle, diff --git a/src/osgWrappers/osgParticle/ParticleSystem.cpp b/src/osgWrappers/osgParticle/ParticleSystem.cpp index bef2095e4..f94f605f5 100644 --- a/src/osgWrappers/osgParticle/ParticleSystem.cpp +++ b/src/osgWrappers/osgParticle/ParticleSystem.cpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include @@ -220,11 +220,11 @@ BEGIN_OBJECT_REFLECTOR(osgParticle::ParticleSystem) __void__update__double, "Update the particles. Don't call this directly, use a ParticleSystemUpdater instead. ", ""); - I_Method1(void, drawImplementation, IN, osg::State &, state, + I_Method1(void, drawImplementation, IN, osg::RenderInfo &, renderInfo, Properties::VIRTUAL, - __void__drawImplementation__osg_State_R1, - "Deprecated. ", - ""); + __void__drawImplementation__osg_RenderInfo_R1, + "drawImplementation(RenderInfo&) is a pure virtual method for the actual implementation of OpenGL drawing calls, such as vertex arrays and primitives, that must be implemented in concrete subclasses of the Drawable base class, examples include osg::Geometry and osg::ShapeDrawable. ", + " param state The osg::State object that encapulates the current OpenGL state for the current graphics context. "); I_Method0(osg::BoundingBox, computeBound, Properties::VIRTUAL, __osg_BoundingBox__computeBound, diff --git a/src/osgWrappers/osgParticle/PrecipitationEffect.cpp b/src/osgWrappers/osgParticle/PrecipitationEffect.cpp index 0ab833972..cdcbe4d6b 100644 --- a/src/osgWrappers/osgParticle/PrecipitationEffect.cpp +++ b/src/osgWrappers/osgParticle/PrecipitationEffect.cpp @@ -402,7 +402,7 @@ BEGIN_OBJECT_REFLECTOR(osgParticle::PrecipitationEffect::PrecipitationDrawable) I_Method1(void, drawImplementation, IN, osg::RenderInfo &, renderInfo, Properties::VIRTUAL, __void__drawImplementation__osg_RenderInfo_R1, - "drawImplementation(State&) is a pure virtual method for the actual implementation of OpenGL drawing calls, such as vertex arrays and primitives, that must be implemented in concrete subclasses of the Drawable base class, examples include osg::Geometry and osg::ShapeDrawable. ", + "drawImplementation(RenderInfo&) is a pure virtual method for the actual implementation of OpenGL drawing calls, such as vertex arrays and primitives, that must be implemented in concrete subclasses of the Drawable base class, examples include osg::Geometry and osg::ShapeDrawable. ", " param state The osg::State object that encapulates the current OpenGL state for the current graphics context. "); I_Method0(osgParticle::PrecipitationEffect::PrecipitationDrawable::CellMatrixMap &, getCurrentCellMatrixMap, Properties::NON_VIRTUAL, diff --git a/src/osgWrappers/osgSim/ImpostorSprite.cpp b/src/osgWrappers/osgSim/ImpostorSprite.cpp index 99b13ebd2..1ff918a58 100644 --- a/src/osgWrappers/osgSim/ImpostorSprite.cpp +++ b/src/osgWrappers/osgSim/ImpostorSprite.cpp @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include #include @@ -158,9 +158,9 @@ BEGIN_OBJECT_REFLECTOR(osgSim::ImpostorSprite) __int__t, "", ""); - I_Method1(void, drawImplementation, IN, osg::State &, state, + I_Method1(void, drawImplementation, IN, osg::RenderInfo &, renderInfo, Properties::VIRTUAL, - __void__drawImplementation__osg_State_R1, + __void__drawImplementation__osg_RenderInfo_R1, "Draw ImpostorSprite directly. ", ""); I_Method1(bool, supports, IN, const osg::Drawable::AttributeFunctor &, x,