From 10e0fee323e6277ba73ee1fc148417882bc381c3 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 26 Aug 2024 13:55:32 +0100 Subject: Add helper to test if a uniform was found --- gfx/gl/program.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gfx/gl/program.h') diff --git a/gfx/gl/program.h b/gfx/gl/program.h index c89a128..20be1aa 100644 --- a/gfx/gl/program.h +++ b/gfx/gl/program.h @@ -33,6 +33,12 @@ public: return location; } + explicit + operator bool() const + { + return location >= 0; + } + protected: GLint location; }; -- cgit v1.2.3