/* -*-c++-*- */
/* osgEarth - Geospatial SDK for OpenSceneGraph
 * Copyright 2018 Pelican Mapping
 * http://osgearth.org
 *
 * osgEarth is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>
 */
#include <osg/Drawable>
#include <osg/RenderInfo>
#include <osg/Version>

namespace osgEarth { namespace SilverLining
{
    class SilverLiningContext;
	class SilverLiningContextNode;
    /**
     * Custom drawable for rendering the SilverLining effects
     */
    class SkyDrawable : public osg::Drawable
    {
    public:
        SkyDrawable(SilverLiningContextNode* contextNode =0L);
        META_Object(SilverLining, SkyDrawable);
     
    public: // osg::Drawable

        // custom draw (called with an active GC)
        void drawImplementation(osg::RenderInfo& ri) const;

        // custom bounds computation
        osg::BoundingBox computeBoundingBox() const;

    protected:
        virtual ~SkyDrawable() { }

        osg::observer_ptr<SilverLiningContext> _SL;
		SilverLiningContextNode* _contextNode;
        
        SkyDrawable(const SkyDrawable& copy, const osg::CopyOp& op=osg::CopyOp::SHALLOW_COPY) { }
    };

} } // namespace osgEarth::SilverLining
