GLProgramming.com

home :: about :: development guides :: irc :: forums :: search :: paste :: links :: contribute :: code dump

-> Click here to learn how to get live help <-


New Paste :: Recent Pastes:: Add Line Numbers


renderer interface by godecho
#ifndef RENDERER_H_
#define RENDERER_H_

#include "vertexbuffer.h"
#include "texture.h"

using kotori::VertexBuffer;
using kotori::Texture;

namespace kotori
{
    class Renderer
    {
        public:

            virtual ~Renderer();
            
            virtual void addVertexBuffer(const VertexBuffer &vb)                        = 0;
            virtual void addVertexBuffer(const VertexBuffer &vb, const Texture &tex)    = 0;

            virtual bool init()        = 0;    // Initializes the renderer
            virtual bool deinit()    = 0;    // Deinitializes the renderer, needed?
            
            virtual void render()    const    = 0;    // Renders loaded buffers
            virtual void clear()            = 0;    // Clears buffers
            virtual void reload()            = 0;    // Reloads all resources in the advent they are lost

        protected:

            virtual void enableAlpha()        = 0;
            virtual void disableAlpha()        = 0;
            virtual void enableTextures()    = 0;
            virtual void disableTextures()    = 0;

        private:
        
            // mention the vertex buffer queues in the base class, or leave it totally up to the derived class? --luke
    };
}

#endif