summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Halase <jordan@halase.me>2019-10-27 12:12:54 -0500
committerJordan Halase <jordan@halase.me>2019-10-27 12:12:54 -0500
commitd225f774017c5900c42ec0ec018e5f45853d6831 (patch)
treeddef3a2c3ceead3500fd2bb244001df37107587f
parente5b677fcdd4f12be188e6b7826b79530a530a4c7 (diff)
Use puglStubBackend
-rw-r--r--main.c7
1 files 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"))) {