diff options
author | David Robillard <d@drobilla.net> | 2019-10-27 11:20:47 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-11-03 21:03:18 +0100 |
commit | 14c7cb54a913be5a505148068582d9c56e3d1681 (patch) | |
tree | b23af8d477bb623ae743492367e8ebeb0a43e699 /pugl/detail/x11_gl.c | |
parent | 84754fdb2ff35779378e032ec2f195a22d66fe30 (diff) | |
download | pugl-14c7cb54a913be5a505148068582d9c56e3d1681.tar.gz pugl-14c7cb54a913be5a505148068582d9c56e3d1681.tar.bz2 pugl-14c7cb54a913be5a505148068582d9c56e3d1681.zip |
Add stub implementations of backend functions
Towards having actual trivial backends, but in general allows backends to not
declare functions they don't care about which is nice and already a net
reduction of actual code.
Diffstat (limited to 'pugl/detail/x11_gl.c')
-rw-r--r-- | pugl/detail/x11_gl.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/pugl/detail/x11_gl.c b/pugl/detail/x11_gl.c index f5dbe2c..ea34fc3 100644 --- a/pugl/detail/x11_gl.c +++ b/pugl/detail/x11_gl.c @@ -22,6 +22,7 @@ #include "pugl/detail/x11.h" #include "pugl/pugl.h" #include "pugl/pugl_gl_backend.h" +#include "pugl/pugl_stub_backend.h" #include <GL/gl.h> #include <GL/glx.h> @@ -188,20 +189,6 @@ puglX11GlLeave(PuglView* view, bool drawing) return PUGL_SUCCESS; } -static PuglStatus -puglX11GlResize(PuglView* PUGL_UNUSED(view), - int PUGL_UNUSED(width), - int PUGL_UNUSED(height)) -{ - return PUGL_SUCCESS; -} - -static void* -puglX11GlGetContext(PuglView* PUGL_UNUSED(view)) -{ - return NULL; -} - PuglGlFunc puglGetProcAddress(const char* name) { @@ -216,8 +203,8 @@ const PuglBackend* puglGlBackend(void) puglX11GlDestroy, puglX11GlEnter, puglX11GlLeave, - puglX11GlResize, - puglX11GlGetContext + puglStubResize, + puglStubGetContext }; return &backend; |