From f535b6eaeed44093bed7d90b4be76363c2e2e4f4 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 24 May 2021 14:12:17 -0400 Subject: Separate stub backends from other backends Stub backends were a dependency of other backends to allow some code reuse. However, that can cause conflicting symbols if multiple backends are linked into the same binary, which should be possible. To avoid this, move the shared code into the platform implementation, and export those symbols so that backends can use them. This adds some semi-public platform-specific API that can only be used by backends included with pugl. They are undocumented, subject to change at any time without a corresponding version change, and may not be used by third parties (for example by custom backends in an application). --- src/win_vulkan.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/win_vulkan.c') diff --git a/src/win_vulkan.c b/src/win_vulkan.c index a892a16..e2d9bb4 100644 --- a/src/win_vulkan.c +++ b/src/win_vulkan.c @@ -1,5 +1,5 @@ /* - Copyright 2012-2020 David Robillard + Copyright 2012-2021 David Robillard Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -20,7 +20,6 @@ #include "types.h" #include "win.h" -#include "pugl/stub.h" #include "pugl/vulkan.h" #include @@ -81,11 +80,11 @@ puglGetDeviceProcAddrFunc(const PuglVulkanLoader* loader) const PuglBackend* puglVulkanBackend() { - static const PuglBackend backend = {puglWinStubConfigure, + static const PuglBackend backend = {puglWinConfigure, puglStubCreate, puglStubDestroy, - puglWinStubEnter, - puglWinStubLeave, + puglWinEnter, + puglWinLeave, puglStubGetContext}; return &backend; -- cgit v1.2.1