From d225f774017c5900c42ec0ec018e5f45853d6831 Mon Sep 17 00:00:00 2001 From: Jordan Halase Date: Sun, 27 Oct 2019 12:12:54 -0500 Subject: Use puglStubBackend --- main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index e3cb99d..37c8c92 100644 --- a/main.c +++ b/main.c @@ -949,6 +949,8 @@ static void destroySwapchainFramebuffers() swapchainFramebuffers = NULL; } +#include "pugl/detail/x11.h" + void initVulkan() { createInstance(); @@ -960,7 +962,6 @@ void initVulkan() ERRQ(SDL_GetError()); } #else -#include "pugl/detail/x11.h" // HACK: Vulkan needs access to this // Eventually, Pugl should wrap the call to XXX, where XXX is one of: // * vkCreateXlibSurfaceKHR() @@ -1896,6 +1897,8 @@ PuglStatus onEvent(PuglView *view, const PuglEvent *e) return PUGL_SUCCESS; } +#include "pugl/pugl_stub_backend.h" + int main(int argc, char **argv) { //if (SDL_Init(SDL_INIT_EVERYTHING) < 0) { @@ -1913,7 +1916,7 @@ int main(int argc, char **argv) puglSetClassName(world, "Pugl Vulkan"); const PuglRect frame = { 0, 0, 1280, 720 }; puglSetFrame(view, frame); - puglSetBackend(view, NULL); + puglSetBackend(view, puglStubBackend()); puglSetViewHint(view, PUGL_RESIZABLE, 1); PuglStatus status; if ((status = puglCreateWindow(view, "Blank Window"))) { -- cgit v1.2.1