
#ifndef __WFX_RENDERER_RENDERABLE_H__
#define __WFX_RENDERER_RENDERABLE_H__

#include <WFX/WFXIncludes.h>
#include <WFX/renderer/RenderContext.h>

namespace WFX {

    namespace renderer {

        class Renderer;
        class RenderTarget;

        /**
         * Renderable interface
         * Any class implementing this interface may be attached
         * to a rendertarget to be drawn
         * A renderable also contains the extended rendering context -
         * some global settings like lighting and depth testing
         */
        class Renderable {
            public:

                /** Ctor */
                Renderable();

                /**
                 * this method is called whenever the RenderTarget
                 * gets drawn
                 */
                virtual void render(WFX::renderer::Renderer* r);

                /** set/get rendertarget */
                void setCurrentTarget(WFX::renderer::RenderTarget* t) {
                    CurrentTarget = t;
                }
                WFX::renderer::RenderTarget * getCurrentTarget() {
                    return CurrentTarget;
                }

                
                /** returns a rendercontext reference */
                inline RenderContext& getRenderContext() {
                    return Context;
                }


            protected:
                /** the current rendertarget */
                WFX::renderer::RenderTarget* CurrentTarget;
                /** rendering context */
                RenderContext Context;
               
            
            private:

        };

    }

}


#endif //include guard


