diff options
author | David Robillard <d@drobilla.net> | 2020-11-22 12:34:35 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-11-25 14:18:04 +0100 |
commit | 7ce9b578a4433f9606b14291fb3b816aa67999d9 (patch) | |
tree | 917fd395aac4708142776b3826900f94e859de53 /src/win_gl.c | |
parent | 3e9a2e01da169007b6fc16492f812055645f6d5f (diff) | |
download | pugl-7ce9b578a4433f9606b14291fb3b816aa67999d9.tar.gz pugl-7ce9b578a4433f9606b14291fb3b816aa67999d9.tar.bz2 pugl-7ce9b578a4433f9606b14291fb3b816aa67999d9.zip |
Move puglEnterContext and puglLeaveContext to GL backends
These only do anything for OpenGL, and it seems unlikely that they will ever be
used for anything else. So, move them to the GL headers to remove clutter from
the core API, and ensure that they are only used in GL applications that
include the appropriate headers and link with a GL backend.
Also add missing C++ bindings.
Diffstat (limited to 'src/win_gl.c')
-rw-r--r-- | src/win_gl.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/win_gl.c b/src/win_gl.c index e46ece8..662baef 100644 --- a/src/win_gl.c +++ b/src/win_gl.c @@ -310,6 +310,18 @@ puglGetProcAddress(const char* name) : (PuglGlFunc)GetProcAddress(GetModuleHandle("opengl32.dll"), name); } +PuglStatus +puglEnterContext(PuglView* view) +{ + return view->backend->enter(view, NULL); +} + +PuglStatus +puglLeaveContext(PuglView* view) +{ + return view->backend->leave(view, NULL); +} + const PuglBackend* puglGlBackend(void) { |