From bd7f8e6658a28a810789e481028d04f8c31db4ed Mon Sep 17 00:00:00 2001 From: lisyarus Date: Thu, 30 Jun 2022 23:07:51 +0300 Subject: [PATCH] Add gfx::array::operator bool --- libs/gfx/include/psemek/gfx/array.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/gfx/include/psemek/gfx/array.hpp b/libs/gfx/include/psemek/gfx/array.hpp index e9c45af7..3bfbf4e9 100644 --- a/libs/gfx/include/psemek/gfx/array.hpp +++ b/libs/gfx/include/psemek/gfx/array.hpp @@ -21,6 +21,8 @@ namespace psemek::gfx GLuint id() const { return id_; } + explicit operator bool() const { return id() != 0; } + void bind() const; void reset();