Skip to content
Snippets Groups Projects

Resolve "Resizing-Event"

Merged Ghost User requested to merge 34-resizing-event into develop
1 file
+ 8
0
Compare changes
  • Side-by-side
  • Inline
@@ -18,6 +18,14 @@ int main(int argc, const char** argv) {
vkcv::CameraManager cameraManager(window, window.getWidth(), window.getHeight());
window.initEvents();
window.e_resize.add([&cameraManager](int width, int height) {
auto& camera = cameraManager.getCamera();
float near;
float far;
camera.getNearFar(near, far);
const float aspectRatio = static_cast<float>(width) / height;
camera.setPerspective(camera.getFov(), aspectRatio, near, far);
});
vkcv::Core core = vkcv::Core::create(
window,
Loading