diff --git a/CMakeLists.txt b/CMakeLists.txt index 135a80c5..0d0a904a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,7 +12,7 @@ include_directories(external/gli) include_directories(external/assimp) include_directories(base) -OPTION(USE_D2D_WSI "Build the project using debugging code" OFF) +OPTION(USE_D2D_WSI "Build the project using Direct to Display swapchain" OFF) IF(WIN32) find_library(VULKAN_LIB NAMES vulkan-1 vulkan PATHS ${CMAKE_SOURCE_DIR}/libs/vulkan) @@ -23,8 +23,8 @@ ELSE(WIN32) find_package(ASSIMP REQUIRED) find_package(Threads REQUIRED) IF(USE_D2D_WSI) - MESSAGE("Using direct to display extension...") - add_definitions(-D_DIRECT2DISPLAY) + MESSAGE("Using direct to display extension...") + add_definitions(-D_DIRECT2DISPLAY) ELSE(USE_D2D_WSI) find_package(XCB REQUIRED) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DVK_USE_PLATFORM_XCB_KHR") diff --git a/README.md b/README.md index 33283c81..6edc960c 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,8 @@ Use the provided CMakeLists.txt with [CMake](https://cmake.org) to generate a bu Note that you need [assimp](https://github.com/assimp/assimp) in order to compile the examples for Linux. Either compile and install from the repository, or install libassimp-dev. The examples require at least version 3.2. +To use the Direct to Display swapchain extension (VK_KHR_display), please turn on the USE_D2D_WSI cmake option: "-DUSE_D2D_WSI=ON". + ## [Android](android/) Building on Android is done using the [Android NDK](http://developer.android.com/tools/sdk/ndk/index.html) and requires a device that supports Vulkan. Please see the [Android readme](./android/README.md) on how to build and deploy the examples.