DirectWrite support (#28)
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good
Reviewed-on: #28
This commit is contained in:
parent
610c63228e
commit
575b8eaee1
17 changed files with 24715 additions and 54 deletions
|
|
@ -1,28 +1,30 @@
|
|||
file(
|
||||
GLOB
|
||||
EXAMPLES_VULKAN_SOURCES
|
||||
*.c
|
||||
GLOB
|
||||
EXAMPLES_VULKAN_SOURCES
|
||||
*.c
|
||||
)
|
||||
find_package(Vulkan)
|
||||
|
||||
foreach(PATH IN LISTS EXAMPLES_VULKAN_SOURCES)
|
||||
get_filename_component(TARGET ${PATH} NAME_WE)
|
||||
add_executable(${TARGET} MACOSX_BUNDLE ${PATH})
|
||||
target_include_directories(
|
||||
${TARGET}
|
||||
PRIVATE
|
||||
${Vulkan_INCLUDE_DIR}
|
||||
)
|
||||
target_link_libraries(
|
||||
${TARGET}
|
||||
PRIVATE
|
||||
Mw
|
||||
)
|
||||
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
target_link_libraries(
|
||||
${TARGET}
|
||||
PRIVATE
|
||||
m
|
||||
)
|
||||
endif()
|
||||
endforeach()
|
||||
if(${Vulkan_FOUND})
|
||||
foreach(PATH IN LISTS EXAMPLES_VULKAN_SOURCES)
|
||||
get_filename_component(TARGET ${PATH} NAME_WE)
|
||||
add_executable(${TARGET} MACOSX_BUNDLE ${PATH})
|
||||
target_include_directories(
|
||||
${TARGET}
|
||||
PRIVATE
|
||||
${Vulkan_INCLUDE_DIR}
|
||||
)
|
||||
target_link_libraries(
|
||||
${TARGET}
|
||||
PRIVATE
|
||||
Mw
|
||||
)
|
||||
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
target_link_libraries(
|
||||
${TARGET}
|
||||
PRIVATE
|
||||
m
|
||||
)
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -1,10 +1,3 @@
|
|||
|
||||
/**
|
||||
* this example is quite minimal, you may need to modify it if your graphics card is more esoteric
|
||||
*
|
||||
* ioixd maintains this file. nishi doesn't know vulkan at all
|
||||
*/
|
||||
|
||||
#include <Mw/Milsko.h>
|
||||
#include <Mw/Widget/Vulkan.h>
|
||||
|
||||
|
|
@ -264,8 +257,8 @@ void vulkan_setup(MwWidget handle) {
|
|||
swapchainCreateInfo.imageExtent = (VkExtent2D){.width = ow, .height = oh},
|
||||
swapchainCreateInfo.imageArrayLayers = 1,
|
||||
swapchainCreateInfo.imageUsage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT |
|
||||
VK_IMAGE_USAGE_TRANSFER_DST_BIT |
|
||||
VK_IMAGE_USAGE_SAMPLED_BIT;
|
||||
VK_IMAGE_USAGE_TRANSFER_DST_BIT |
|
||||
VK_IMAGE_USAGE_SAMPLED_BIT;
|
||||
// th is how we specify no transformation.
|
||||
swapchainCreateInfo.preTransform = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR;
|
||||
swapchainCreateInfo.compositeAlpha = VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue