diff --git a/src/gl-util.h b/src/gl-util.h index 57a0b4e..f6c15c2 100644 --- a/src/gl-util.h +++ b/src/gl-util.h @@ -42,6 +42,10 @@ struct ID \ { \ return gl == o.gl; \ } \ + bool operator!=(const ID &o) const \ + { \ + return !(*this == o); \ + } \ }; /* 2D Texture */ @@ -236,6 +240,13 @@ struct TEXFBO FBO::del(obj.fbo); TEX::del(obj.tex); } + + static inline void clear(TEXFBO &obj) + { + obj.tex = TEX::ID(0); + obj.fbo = FBO::ID(0); + obj.width = obj.height = 0; + } }; #endif // GLUTIL_H