Theme Catppuccin
Make yourself at homeCatppuccin

A softer light for long learning sessions.

Appearance

Loading your preference…

Dark palette

Choose a dark palette to try it.

Light uses Latte. Your choices stay in this browser.

Back to your source shelf

Inside the companion

Vulkan · Signal Garden

Query a device and study a clear-color window with explicit frame and presentation lifetimes.

Project files 6

Choose Vulkan probes and a window

Build CPU contracts and optional Vulkan capability and clear-window targets.

32 lines CMakeLists.txt
cmake_minimum_required(VERSION 3.24)
project(signal_garden_contracts LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
add_executable(signal-contracts contracts_test.cpp)
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU")
  target_compile_options(signal-contracts PRIVATE -Wall -Wextra -Wpedantic -Wconversion -Wshadow)
endif()

option(SIGNAL_BUILD_WINDOW "Build the complete Vulkan clear-color window checkpoint" OFF)
if(SIGNAL_BUILD_WINDOW)
  find_package(Vulkan 1.3 REQUIRED)
  find_package(glfw3 3.4 CONFIG REQUIRED)
  add_executable(signal-window clear_window.cpp)
  target_link_libraries(signal-window PRIVATE Vulkan::Vulkan glfw)
  if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU")
    target_compile_options(signal-window PRIVATE -Wall -Wextra -Wpedantic -Wconversion -Wshadow)
  endif()
endif()
enable_testing()
add_test(NAME allocation-contracts COMMAND signal-contracts)
option(SIGNAL_BUILD_VULKAN_PROBE "Build the Vulkan 1.3 capability probe" OFF)
if(SIGNAL_BUILD_VULKAN_PROBE)
  find_package(Vulkan 1.3 REQUIRED)
  add_executable(signal-capabilities capabilities.cpp)
  target_link_libraries(signal-capabilities PRIVATE Vulkan::Vulkan)
  if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU")
    target_compile_options(signal-capabilities PRIVATE -Wall -Wextra -Wpedantic -Wconversion -Wshadow)
  endif()
endif()

This is the file included with the course. Copy and download give you its complete source.

Taking your work offline? Download all course companions