ISwapchain::getHeight - dpw105f18/papago-api GitHub Wiki

Get height of swapchain

uint32_t getHeight()

Returns

Returns height of ISwapchain color buffer.

Example of getHeight

#include "isurface.hpp"
#include "idevice.hpp"
#include "api_enums.hpp"
#include "iswapchain.hpp"

int main()
{
   /*
   setup code omitted
   */ 

   //Create a SwapChain
   auto swapChain = device->createSwapChain(
     Format::eR8G8B8A8Unorm, 
     Format::eD32Sfloat, 
     3, 
     IDevice::PresentMode::eMailbox);
   
   //Get the height of the swapchain. This is used when creating a renderpass.
   auto swapchainHeight = swapChain->getHeight();
}