aboutsummaryrefslogtreecommitdiffstats
path: root/bindings
diff options
context:
space:
mode:
Diffstat (limited to 'bindings')
-rw-r--r--bindings/cxx/include/pugl/gl.hpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/bindings/cxx/include/pugl/gl.hpp b/bindings/cxx/include/pugl/gl.hpp
index ba7143b..529babb 100644
--- a/bindings/cxx/include/pugl/gl.hpp
+++ b/bindings/cxx/include/pugl/gl.hpp
@@ -24,6 +24,7 @@
#include "pugl/gl.h"
#include "pugl/pugl.h"
+#include "pugl/pugl.hpp"
namespace pugl {
@@ -44,6 +45,20 @@ getProcAddress(const char* name) noexcept
return puglGetProcAddress(name);
}
+/// @copydoc puglEnterContext
+inline Status
+enterContext(View& view) noexcept
+{
+ return static_cast<Status>(puglEnterContext(view.cobj()));
+}
+
+/// @copydoc puglLeaveContext
+inline Status
+leaveContext(View& view) noexcept
+{
+ return static_cast<Status>(puglLeaveContext(view.cobj()));
+}
+
/// @copydoc puglGlBackend
inline const PuglBackend*
glBackend() noexcept