Add support for rendering for the headless extension

This commit is contained in:
Per Inge Mathisen 2021-04-27 13:52:27 +02:00
parent a2a604be47
commit 45ba247b55
6 changed files with 68 additions and 5 deletions

View file

@ -1188,6 +1188,7 @@ int main(const int argc, const char *argv[])
// Linux entry point
VulkanExample *vulkanExample;
#if defined(VK_USE_PLATFORM_XCB_KHR)
static void handleEvent(const xcb_generic_event_t *event)
{
if (vulkanExample != NULL)
@ -1195,6 +1196,11 @@ static void handleEvent(const xcb_generic_event_t *event)
vulkanExample->handleEvent(event);
}
}
#else
static void handleEvent()
{
}
#endif
int main(const int argc, const char *argv[])
{
for (size_t i = 0; i < argc; i++) { VulkanExample::args.push_back(argv[i]); };