]> git.tdb.fi Git - libs/gl.git/blobdiff - source/texture.h
Enable resource management on Texture2D
[libs/gl.git] / source / texture.h
index 477eaca382fa55dbe6ab1925fb62677db1ed72c1..5566dccb8c9a111f55336b59d6aa7b68d08c0370 100644 (file)
@@ -4,12 +4,11 @@
 #include <msp/datafile/objectloader.h>
 #include "gl.h"
 #include "predicate.h"
+#include "resource.h"
 
 namespace Msp {
 namespace GL {
 
-class Resources;
-
 enum TextureFilter
 {
        /// No filtering
@@ -65,7 +64,7 @@ texture to be usable.
 If texture coordinates fall outside of the principal range of the texture,
 wrapping is applied.  The default for all directions is REPEAT.
 */
-class Texture
+class Texture: public Resource
 {
 protected:
        class Loader: public DataFile::CollectionObjectLoader<Texture>
@@ -116,7 +115,7 @@ protected:
        Predicate cmp_func;
        mutable int dirty_params;
 
-       Texture(GLenum);
+       Texture(GLenum, ResourceManager * = 0);
        Texture(const Texture &);
        Texture &operator=(const Texture &);
 public: