#include <iostream>
#include <vector>

class TextureLoader;
class Texture
{
public:

    typedef std::size_t Id;
    static const Id NULL_ID = 0;

private:
    
    // width, height, depth

    Id _id = NULL_ID;
};

class TextureLoader
{
public:
    
    virtual bool load(const std::string& filepath, Texture* texture) = 0;
    virtual void destroy(Texture* texture) = 0;
};

class OglTextureLoader : public TextureLoader
{
public:

    virtual bool load(const std::string& filepath, Texture* texture)
    {
        /*
        // load the texture in an image
        GLuint actualTexture = 0;
        // gl specific code...
         texture->_id = nextId();
        // resize array if _actualTextures if required
        _actualTextures[texture->id] = actualTexture;
        */
        std::cout << "Loading image: " << filepath << "...\n";
        std::cout << "Uploading image to OpenGL Texture...\n";
        return true;
    }
    
    virtual void destroy(Texture* texture)
    {
        // glDeleteTextures(_oglTextures[texture->_id]);
        std::cout << "Destroying OpenGL Texture\n";
    }

private:

    std::vector<unsigned int /* GLuint */> _oglTextures; // use texture id's for index
};

int main(int argc, char* argv[])
{
    Texture texture;
    TextureLoader* textureLoader = new OglTextureLoader;
    
    if(!textureLoader->load("something.png", &texture))
    {
        std::cout << "Failed to load something.png";
    }
    
    textureLoader->destroy(&texture);
    
    delete textureLoader;
    return 0;
}