diff options
| author | quou <quou@disroot.org> | 2025-02-08 21:52:32 +1100 |
|---|---|---|
| committer | quou <quou@disroot.org> | 2025-02-08 21:52:32 +1100 |
| commit | e473fa91ec575b0a180d766bc29554db8861508e (patch) | |
| tree | 7df81aef72f3d54096c900aa43953d591765ef9f | |
| parent | 97563f587aea323b3b9716ad28fccbe6fdb91d0e (diff) | |
device get swap width and height
| -rw-r--r-- | video.cpp | 10 | ||||
| -rw-r--r-- | video.hpp | 3 |
2 files changed, 13 insertions, 0 deletions
@@ -3863,6 +3863,16 @@ void Device::destroy_sampleri(Sampler_Id id) { s.destroy(dev); } +int Device::swap_w() { + Device_Vk* dev = (Device_Vk*)this; + return (int)dev->swapchain.size.width; +} + +int Device::swap_h() { + Device_Vk* dev = (Device_Vk*)this; + return (int)dev->swapchain.size.height; +} + void Shader_Loader::init(Device_Vk* d) { dev = d; } @@ -519,6 +519,9 @@ struct Device { ); void destroy_sampler(Sampler_Id id); void destroy_sampleri(Sampler_Id id); + + int swap_w(); + int swap_h(); }; struct Context { |