Add explicit bool cast for OpenGL objects
This commit is contained in:
parent
8040d5e1d2
commit
726b8486c7
4 changed files with 8 additions and 2 deletions
|
|
@ -21,6 +21,8 @@ namespace psemek::gfx
|
|||
|
||||
GLuint id() const { return id_; }
|
||||
|
||||
explicit operator bool() const { return id() != 0; }
|
||||
|
||||
void bind() const;
|
||||
|
||||
void reset();
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@ namespace psemek::gfx
|
|||
|
||||
GLuint id() const { return id_; }
|
||||
|
||||
explicit operator bool() const { return id() != 0; }
|
||||
|
||||
void bind() const;
|
||||
|
||||
void reset();
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@ namespace psemek::gfx
|
|||
|
||||
GLuint id() const { return id_; }
|
||||
|
||||
explicit operator bool() const { return id() != 0; }
|
||||
|
||||
void bind() const;
|
||||
|
||||
void reset();
|
||||
|
|
|
|||
|
|
@ -27,12 +27,12 @@ namespace psemek::gfx
|
|||
|
||||
GLuint id() const { return id_; }
|
||||
|
||||
explicit operator bool() const { return id() != 0; }
|
||||
|
||||
void reset();
|
||||
|
||||
void bind() const;
|
||||
|
||||
explicit operator bool() const { return id() != 0; }
|
||||
|
||||
geom::vector<std::size_t, D> size() const { return size_; }
|
||||
|
||||
std::size_t width() const;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue