+ inline void setMinFilter(GLuint filter)
+ {
+ bind();
+ minFilter_ = filter;
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, minFilter_);
+ }
+
+ inline void setMagFilter(GLuint filter)
+ {
+ bind();
+ magFilter_ = filter;
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, magFilter_);
+ }
+
+ inline void setWrapS(GLuint wrap)
+ {
+ bind();
+ wrapS_ = wrap;
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, wrapS_);
+ }
+
+ inline void setWrapT(GLuint wrap)
+ {
+ bind();
+ wrapT_ = wrap;
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, wrapT_);
+ }
+
+
+ inline void bind()
+ {
+ if (object_ == 0)
+ {
+ uploadToGL();
+ }
+ if (object_ != globalObject_)
+ {
+ glBindTexture(GL_TEXTURE_2D, object_);
+ globalObject_ = object_;
+ }
+ }