![]() |
VPP
0.7
A high-level modern C++ API for Vulkan
|
Represents the instance of Vulkan system. More...
#include <vppInstance.hpp>
Public Types | |
enum | EFlags { NO_FLAGS, VALIDATION } |
Flags for instance creation. More... | |
Public Member Functions | |
Instance (unsigned int flags=0) | |
The constructor. More... | |
~Instance () | |
Destructor. | |
VkInstance | handle () const |
Retrieves Vulkan handle for the instance. | |
bool | valid () const |
Checks whether instance creation has succeeded. | |
VkResult | enumeratePhysicalDevices (PhysicalDevices *pResult) const |
Gets a list of physical devices in the system. | |
Static Public Member Functions | |
static VkResult | enumerateExtensions (ExtensionProperties *pResult) |
Gets a list of available Vulkan extensions. | |
static DebugReporter * | getDebugReporter () |
Gets currently registered debug reporter, or zero if there is no one. | |
Represents the instance of Vulkan system.
The instance is the root object of entire Vulkan system. The main purpose is to provide access to physical devices in the system as well as the list of available Vulkan extensions.
There can be only one instance object per program. You can construct multiple ones, but all of them will point to the same object internally. Do not create many instances from different threads however, this operation is not thread safe. Best practice is to create just one, from your main thread and keep its life time until the end of the program. You can pass the Instance object by value, also to other threads.
This object is reference-counted and may be passed by value.
|
explicit |
The constructor.
Takes optional flags.
An example: