#pragma once
#include "Gui/3D/Texture.h"
#include "Surface.h"

#ifdef GUI_GTK

namespace gui {
	/**
	 * Texture stored on the GPU.
	 */
    class GLTexture {
	public:
		// Create.
		GLTexture(GLSurface &surface, Texture *texture);

		// Destroy.
		~GLTexture();

		// OpenGL handle to the GPU texture.
		GLuint handle;

		// Surface.
		GLSurface &surface;

		// Destroy.
		static void destroy(void *me) {
			delete (GLTexture *)me;
		}

		// Update GPU texture data.
		void update(Texture *texture);
	};
}

#endif
