aboutsummaryrefslogtreecommitdiffstats
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
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.
-rw-r--r--pugl/pugl.h11
-rw-r--r--pugl/pugl_gl_backend.h11
2 files changed, 11 insertions, 11 deletions
diff --git a/pugl/pugl.h b/pugl/pugl.h
index 2637734..868ebd5 100644
--- a/pugl/pugl.h
+++ b/pugl/pugl.h
@@ -715,11 +715,6 @@ puglGetNativeWindow(PuglView* view);
typedef struct PuglBackendImpl PuglBackend;
/**
- OpenGL extension function.
-*/
-typedef void (*PuglGlFunc)(void);
-
-/**
Set the graphics backend to use.
This needs to be called once before creating the window to set the graphics
@@ -731,12 +726,6 @@ PUGL_API PuglStatus
puglSetBackend(PuglView* view, const PuglBackend* backend);
/**
- Return the address of an OpenGL extension function.
-*/
-PUGL_API PuglGlFunc
-puglGetProcAddress(const char* name);
-
-/**
Get the drawing context.
The context is only guaranteed to be available during an expose.
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.