VKVG  
Vulkan Vector Graphics
Loading...
Searching...
No Matches

◆ vkvg_device_destroy()

void vkvg_device_destroy ( VkvgDevice  dev)

Create a new VkvgDevice connected to the vulkan context define by an instance, a physical device, a logical device, a graphical queue family index and an its index.

On success, create a new vkvg device and set its reference count to 1. On error, query the device status by calling vkvg_device_status(). Error could be one of the following:

  • VKVG_STATUS_INVALID_FORMAT: the combination of image format and tiling is not supported
  • VKVG_STATUS_NULL_POINTER: vulkan function pointer fetching failed.
Parameters
insta valid Vulkan instance to create the device from.
phyVulkan physical device used to create the vkvg device.
vkdevVulkan logical device to create the vkvg device for.
qFamIdxQueue family Index of the graphic queue used for drawing operations.
qIndexIndex of the queue into the choosen familly, 0 in general.
Returns
The handle of the created vkvg device, or null if an error occured.

Create a new multisampled vkvg device.

This function allows to create vkvg device for working with multisampled surfaces. Multisampling is used to smooth color transitions in drawings, making lines not pixelised and diagonal edges not stepped. Multisampling has a performance cost. The final image of the surface, accessible by the user will be a resolved single sampled image.

Parameters
instVulkan instance to create the device from.
phyVulkan physical device used to create the vkvg device.
vkdevVulkan logical device to create the vkvg device for.
qFamIdxQueue family Index of the graphic queue used for drawing operations.
qIndexIndex of the queue into the choosen familly, 0 in general.
samplesThe sample count that will be setup for the surfaces created by this device.
Returns
The handle of the created vkvg device, or null if an error occured.

Decrement the reference count of the device by 1. Release all its resources if count reaches 0.

If device is referenced by several active surfaces, calling destroy will only decrement the reference count by 1. When the reference count reaches 0, the vkvg device is effectively destroyed, the device pointer is freed, and vulkan objects are released. Vkvg Devices has to stay active as long as surfaces created by it are used.

Parameters
devThe vkvg device to destroy.