VPP  0.7
A high-level modern C++ API for Vulkan
Public Member Functions | List of all members
vpp::Surface Class Reference

Represents a surface visible on the screen. More...

#include <vppSurface.hpp>

Public Member Functions

 Surface ()
 Constructs null reference.
 
 Surface (const SurfaceInfo &surfaceInfo, const PhysicalDevice &hDevice, const Instance &hInstance)
 Constructs Surface object.
 
 Surface (VkSurfaceKHR hSurface, const PhysicalDevice &hDevice, const Instance &hInstance)
 Constructs Surface object from existng Vulkan surface handle.
 
VkSurfaceKHR handle () const
 Retrieves the Vulkan handle.
 
bool getCapabilities (VkSurfaceCapabilitiesKHR *pResult) const
 Retrieves surface capabilities.
 
bool getFormats (SurfaceFormats *pResult) const
 Retrieves a list of formats supported by the surface.
 
bool getPresentationModes (PresentationModes *pResult) const
 Retrieves a list of queuing modes supported by the surface.
 
VkExtent2D getSize () const
 Retrieves the surface size in pixels.
 
VkFormat getDefaultFormat (VkColorSpaceKHR *pColorSpace=0) const
 Retrieves the default format and color space.
 
void getParametersAsText (std::ostream &sst) const
 Retrieves various surface parameters in text format for diagnostic logging.
 

Detailed Description

Represents a surface visible on the screen.

A Surface is generalization of physical screen or window. This is abstract concept, portable and isolated from window system details.

In most applications you want to display some image on the screen. Creating a Surface object is the first step. Next, you need to create a SwapChain object from Surface and Device objects. Now you can obtain a set of image objects which can act as rendering targets.

Also you can query the Surface object for various parameters and capabilities.


The documentation for this class was generated from the following file: