diff --git a/projects/first_scene/src/main.cpp b/projects/first_scene/src/main.cpp index 17ac917a57a2ece0dda4c8b20750792a0491340d..cf238375c4107ecbc1fc7f587734d51a41255752 100644 --- a/projects/first_scene/src/main.cpp +++ b/projects/first_scene/src/main.cpp @@ -93,7 +93,7 @@ int main(int argc, const char** argv) { return EXIT_FAILURE; } - auto swapchainExtent = core.getSwapchain().getExtent(); + auto swapchainExtent = core.getSwapchain(windowHandle).getExtent(); vkcv::ImageHandle depthBuffer = core.createImage( vk::Format::eD32Sfloat, diff --git a/projects/mesh_shader/src/main.cpp b/projects/mesh_shader/src/main.cpp index bbfe16ac549383d13fe5f400802d3dfed267db50..0bd279130f35d4c67fa61a1c00469ffa93c2bd5c 100644 --- a/projects/mesh_shader/src/main.cpp +++ b/projects/mesh_shader/src/main.cpp @@ -203,7 +203,7 @@ int main(int argc, const char** argv) { vkcv::DescriptorSetLayoutHandle vertexShaderDescriptorSetLayout = core.createDescriptorSetLayout(bunnyShaderProgram.getReflectedDescriptors().at(0)); vkcv::DescriptorSetHandle vertexShaderDescriptorSet = core.createDescriptorSet(vertexShaderDescriptorSetLayout); - auto swapchainExtent = core.getSwapchain().getExtent(); + auto swapchainExtent = core.getSwapchain(windowHandle).getExtent(); const vkcv::PipelineConfig bunnyPipelineDefinition { bunnyShaderProgram, diff --git a/projects/particle_simulation/src/main.cpp b/projects/particle_simulation/src/main.cpp index 4171c73a4a9e101502a46885a6eff9c97130f3a8..afb1c177805d5a06202c7d5a267ecf99e05bef6a 100644 --- a/projects/particle_simulation/src/main.cpp +++ b/projects/particle_simulation/src/main.cpp @@ -209,7 +209,7 @@ int main(int argc, const char **argv) { cameraManager.getCamera(camIndex1).setPosition(glm::vec3(0.0f, 0.0f, -2.0f)); cameraManager.getCamera(camIndex1).setCenter(glm::vec3(0.0f, 0.0f, 0.0f)); - auto swapchainExtent = core.getSwapchain().getExtent(); + auto swapchainExtent = core.getSwapchain(windowHandle).getExtent(); vkcv::ImageHandle colorBuffer = core.createImage( colorFormat, @@ -219,7 +219,7 @@ int main(int argc, const char **argv) { ).getHandle(); BloomAndFlares bloomAndFlares(&core, colorFormat, swapchainExtent.width, swapchainExtent.height); window.e_resize.add([&](int width, int height) { - swapchainExtent = core.getSwapchain().getExtent(); + swapchainExtent = core.getSwapchain(windowHandle).getExtent(); colorBuffer = core.createImage( colorFormat, swapchainExtent.width, diff --git a/projects/voxelization/src/main.cpp b/projects/voxelization/src/main.cpp index 3b3e60a1be484f999f6ee38cf6347d16c43cd6c5..1411e327216e1045847c66c7f40446a2ebbbb1bb 100644 --- a/projects/voxelization/src/main.cpp +++ b/projects/voxelization/src/main.cpp @@ -23,6 +23,9 @@ int main(int argc, const char** argv) { features.requireExtension(VK_KHR_SHADER_FLOAT16_INT8_EXTENSION_NAME); features.requireExtension(VK_KHR_16BIT_STORAGE_EXTENSION_NAME); + const uint32_t windowWidth = 1280; + const uint32_t windowHeight = 720; + vkcv::Core core = vkcv::Core::create( applicationName, VK_MAKE_VERSION(0, 0, 1), @@ -295,7 +298,7 @@ int main(int argc, const char** argv) { vkcv::DescriptorSetLayoutHandle prepassDescriptorSetLayout = core.createDescriptorSetLayout({}); vkcv::DescriptorSetHandle prepassDescriptorSet = core.createDescriptorSet(prepassDescriptorSetLayout); - auto swapchainExtent = core.getSwapchain().getExtent(); + auto swapchainExtent = core.getSwapchain(windowHandle).getExtent(); vkcv::PipelineConfig prepassPipelineConfig{ depthPrepassShader,