add direct to display wsi swapchain option

direct to display swapchain needs to be enabled at compile time with option -DUSE_D2D_WSI=ON

currently tested under linux
This commit is contained in:
Shi Yan 2016-11-04 13:32:58 -07:00
parent 6f75370240
commit 9b5127f894
25 changed files with 262 additions and 45 deletions

View file

@ -392,6 +392,23 @@ void android_main(android_app* state) \
vulkanExample->renderLoop(); \
delete(vulkanExample); \
}
#elif defined(_DIRECT2DISPLAY)
// Linux entry point with direct to display wsi
// todo: extract command line arguments
#define VULKAN_EXAMPLE_MAIN() \
VulkanExample *vulkanExample; \
static void handleEvent() \
{ \
} \
int main(const int argc, const char *argv[]) \
{ \
vulkanExample = new VulkanExample(); \
vulkanExample->initSwapchain(); \
vulkanExample->prepare(); \
vulkanExample->renderLoop(); \
delete(vulkanExample); \
return 0; \
}
#elif defined(__linux__)
// Linux entry point
// todo: extract command line arguments