#ifndef SDLTEXTURE_H
#define SDLTEXTURE_H

#include "ITexture.h"

namespace Salamander
{

/*
** SDL Implementation of the texture interface. Used for storing pixel data.
*/

class SDLTexture : public ITexture
{
	/*
	** Textures can only be loaded through the Asset Manager.
	*/
	friend class AssetManager;

public:
	/*
	** Clears up pixel data.
	*/
	registerAsset();
	virtual ~SDLTexture();

protected:
	/*
	** Protected constructor means that only the asset manager can create textures. We register this class as
	** an Asset type so that the asset manager knows how to create it.
	*/
	SDLTexture();

	/*
	** Attempt to load an image file from the given path into an openGL texture.
	*/
	virtual bool load(const std::string& name);

private:
public:
	/*
	** Texture data is loaded into GPU memory, and bound to this Id by openGL. Once in this
	** state, the texture memory in RAM can be unloaded.
	*/
	unsigned int boundTexture_;
};

};

#endif
