]> git.tdb.fi Git - libs/gl.git/blobdiff - source/texunit.h
Add vertex arrays and buffers
[libs/gl.git] / source / texunit.h
diff --git a/source/texunit.h b/source/texunit.h
new file mode 100644 (file)
index 0000000..5aec5b3
--- /dev/null
@@ -0,0 +1,32 @@
+#ifndef MSP_GL_TEXUNIT_H_
+#define MSP_GL_TEXUNIT_H_
+
+#include <vector>
+
+namespace Msp {
+namespace GL {
+
+class Texture;
+
+class TexUnit
+{
+public:
+       TexUnit();
+       bool set_texture(const Texture *);
+       const Texture *get_texture() { return texture; }
+       //TexEnv &get_env() { return env; }
+
+       static TexUnit &activate(unsigned);
+       static TexUnit &current();
+private:
+       const Texture *texture;
+       //TexEnv env;
+
+       static std::vector<TexUnit> units;
+       static TexUnit *cur_unit;
+};
+
+} // namespace GL
+} // namespace Msp
+
+#endif