X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ftexture.h;h=5566dccb8c9a111f55336b59d6aa7b68d08c0370;hb=47abe7c9e1633ca65f910a4db340724117a6f6e5;hp=c091c884cacfd592833120b785c7f83ff2fe303e;hpb=6fd9b09f47ff6a07bd5ca7f9e8887db3486bfcb1;p=libs%2Fgl.git diff --git a/source/texture.h b/source/texture.h index c091c884..5566dccb 100644 --- a/source/texture.h +++ b/source/texture.h @@ -4,6 +4,7 @@ #include #include "gl.h" #include "predicate.h" +#include "resource.h" namespace Msp { namespace GL { @@ -63,14 +64,20 @@ 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::ObjectLoader + class Loader: public DataFile::CollectionObjectLoader { + protected: + bool srgb; + public: Loader(Texture &); + Loader(Texture &, Collection &); private: + void init(); + void filter(TextureFilter); void generate_mipmap(bool); void mag_filter(TextureFilter); @@ -108,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: