#ifndef MSP_GL_TEXTURE_H_
#define MSP_GL_TEXTURE_H_
-#include <GL/gl.h>
+#include <istream>
+#include <msp/datafile/loader.h>
+#include "gl.h"
#include "types.h"
namespace Msp {
LINEAR_MIPMAP_LINEAR = GL_LINEAR_MIPMAP_LINEAR
};
-enum TextureFormat
-{
- LUMINANCE8,
- LUMINANCE8_ALPHA8,
- RGB8,
- RGBA8,
- BGR8,
- BGRA8
-};
+std::istream &operator>>(std::istream &, TextureFilter &);
+
+/**
+Base class for textures. This class only defines operations common for all
+texture types and is not instantiable. For specifying images for textures, see
+one of the dimensioned texture classes.
+*/
class Texture
{
+protected:
+ class Loader: public DataFile::Loader
+ {
+ protected:
+ Texture &tex;
+
+ public:
+ Loader(Texture &);
+ void min_filter(TextureFilter);
+ void mag_filter(TextureFilter);
+ void generate_mipmap(bool);
+ };
+
public:
~Texture();