aboutsummaryrefslogtreecommitdiffstats
path: root/pugl/pugl_gl_backend.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-11-18 19:37:12 +0100
committerDavid Robillard <d@drobilla.net>2019-11-18 19:40:45 +0100
commitc3efbc6e434168c7f797d787f56c7f7d5fdbdb6f (patch)
tree6cb9a1e547795205cdea5865d000200f9af8b31c /pugl/pugl_gl_backend.h
parent47beee70b04438f291ba00b6dc9d14ec4a54c662 (diff)
downloadpugl-c3efbc6e434168c7f797d787f56c7f7d5fdbdb6f.tar.gz
pugl-c3efbc6e434168c7f797d787f56c7f7d5fdbdb6f.tar.bz2
pugl-c3efbc6e434168c7f797d787f56c7f7d5fdbdb6f.zip
Move puglGetProcAddress to pugl_gl_backend.h
This establishes a general pattern for backend-specific APIs, so that pugl.h doesn't become a mess. The name of these headers, and the definition of "backend", is a little fuzzy here, but it was before in reality anyway.
Diffstat (limited to 'pugl/pugl_gl_backend.h')
-rw-r--r--pugl/pugl_gl_backend.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/pugl/pugl_gl_backend.h b/pugl/pugl_gl_backend.h
index 5913b95..59e76d1 100644
--- a/pugl/pugl_gl_backend.h
+++ b/pugl/pugl_gl_backend.h
@@ -28,6 +28,17 @@ extern "C" {
#endif
/**
+ OpenGL extension function.
+*/
+typedef void (*PuglGlFunc)(void);
+
+/**
+ Return the address of an OpenGL extension function.
+*/
+PUGL_API PuglGlFunc
+puglGetProcAddress(const char* name);
+
+/**
OpenGL graphics backend.
Pass the return value to puglInitBackend() to draw to a view with OpenGL.