// ***DO NOT EDIT THIS FILE - IT IS AUTOMATICALLY GENERATED BY CMAKE***
/* -*-c++-*- */
/* osgEarth - Geospatial SDK for OpenSceneGraph
* Copyright 2008-2012 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 <osgEarth/ShaderLoader>

namespace osgEarth { namespace REX
{
    struct REXShaders : public osgEarth::Util::ShaderPackage
    {
        virtual std::string vert() = 0;
        virtual std::string elevation() = 0;
        virtual std::string geom() = 0;
        virtual std::string tessellation() = 0;
        virtual std::string normal_map() = 0;
        virtual std::string morphing() = 0;
        virtual std::string imagelayer() = 0;
        virtual std::string sdk() = 0;
        virtual std::string types() = 0;
    };

    struct ShadersGL3 : public REXShaders
    {
        ShadersGL3();

        std::string
            ENGINE_VERT,
            ENGINE_ELEVATION,
            ENGINE_GEOM,
            ENGINE_TESSELLATION,
            ENGINE_NORMAL_MAP,
            ENGINE_MORPHING,
            ENGINE_IMAGELAYER,
            ENGINE_SDK;

        virtual std::string vert() { return ENGINE_VERT; }
        virtual std::string elevation() { return ENGINE_ELEVATION; }
        virtual std::string geom() { return ENGINE_GEOM; }
        virtual std::string tessellation() { return ENGINE_TESSELLATION; }
        virtual std::string normal_map() { return ENGINE_NORMAL_MAP; }
        virtual std::string morphing() { return ENGINE_MORPHING; }
        virtual std::string imagelayer() { return ENGINE_IMAGELAYER; }
        virtual std::string sdk() { return ENGINE_SDK; }
        virtual std::string types() { return ""; }
    };

    struct ShadersGL4 : public REXShaders
    {
        ShadersGL4();

        std::string
            ENGINE_VERT,
            ENGINE_ELEVATION,
            ENGINE_GEOM,
            ENGINE_TESSELLATION,
            ENGINE_NORMAL_MAP,
            ENGINE_IMAGELAYER,
            ENGINE_SDK,
            ENGINE_TYPES;

        virtual std::string vert() { return ENGINE_VERT; }
        virtual std::string elevation() { return ENGINE_ELEVATION; }
        virtual std::string geom() { return ENGINE_GEOM; }
        virtual std::string tessellation() { return ENGINE_TESSELLATION; }
        virtual std::string normal_map() { return ENGINE_NORMAL_MAP; }
        virtual std::string morphing() { return ""; }
        virtual std::string imagelayer() { return ENGINE_IMAGELAYER; }
        virtual std::string sdk() { return ENGINE_SDK; }
        virtual std::string types() { return ENGINE_TYPES; }
    };

    struct REXShadersFactory
    {
        static ShadersGL3 s_gl3;
        static ShadersGL4 s_gl4;
        static REXShaders& get(bool use_gl4) { return use_gl4 ? (REXShaders&)s_gl4 : (REXShaders&)s_gl3; }
    };
	
} } // namespace osgEarth::REX
