X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ftexture.h;h=55eda001a79ec0b12dc3c1e52628327653733365;hb=982005bfbccb429767d0676bd840caf1118c9e21;hp=7c29865747e79f6e7972bc329885303ea09fe52e;hpb=7adcad3b40a03000a82e32db4523761c218309b8;p=libs%2Fgl.git diff --git a/source/texture.h b/source/texture.h index 7c298657..55eda001 100644 --- a/source/texture.h +++ b/source/texture.h @@ -1,3 +1,10 @@ +/* $Id$ + +This file is part of libmspgl +Copyright © 2007 Mikko Rasa, Mikkosoft Productions +Distributed under the LGPL +*/ + #ifndef MSP_GL_TEXTURE_H_ #define MSP_GL_TEXTURE_H_ @@ -30,23 +37,25 @@ enum TextureFormat class Texture { public: + ~Texture(); + void bind() const; void parameter(GLenum, int); void parameter(GLenum, float); void set_min_filter(TextureFilter f) { parameter(GL_TEXTURE_MIN_FILTER, f); } void set_mag_filter(TextureFilter f) { parameter(GL_TEXTURE_MAG_FILTER, f); } + GLenum get_target() const { return target; } uint get_id() const { return id; } - sizei get_width(int =0) const; - sizei get_height(int =0) const; - sizei get_depth(int =0) const; - ~Texture(); + + static void unbind(); protected: uint id; GLenum target; Texture(); - - static const Texture *bound; + Texture(const Texture &); + Texture &operator=(const Texture &); + void maybe_bind() const; }; } // namespace GL