Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
src_gui_vulkan_qvulkanfunctions.cpp
Go to the documentation of this file.
1// Copyright (C) 2018 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
4#include <QVulkanDeviceFunctions>
5#include <QVulkanFunctions>
6#include <QVulkanInstance>
7
9
10struct Window {
11 void init();
12 QVulkanInstance *vulkanInstance() { return nullptr; }
13};
14
16void Window::init()
17{
19 QVulkanFunctions *f = inst->functions();
20 // ...
21 uint32_t count = 0;
22 VkResult err = f->vkEnumeratePhysicalDevices(inst->vkInstance(), &count, nullptr);
23 // ...
24}
26
27} // namespace src_gui_vulkan_qvulkanfunctions {
28
29
31struct Window {
32 void render();
33 QVulkanInstance *vulkanInstance() { return nullptr; }
34};
35VkDevice_T *device = nullptr;
36VkCommandBufferAllocateInfo cmdBufInfo;
37VkCommandBuffer cmdBuf;
38
40void Window::render()
41{
43 QVulkanDeviceFunctions *df = inst->deviceFunctions(device);
44 VkResult err = df->vkAllocateCommandBuffers(device, &cmdBufInfo, &cmdBuf);
45 // ...
46}
48
49} // src_gui_vulkan_qvulkanfunctions2
The QVulkanDeviceFunctions class provides cross-platform access to the device level core Vulkan 1....
The QVulkanFunctions class provides cross-platform access to the instance level core Vulkan 1....
The QVulkanInstance class represents a native Vulkan instance, enabling Vulkan rendering onto a QSurf...
GLenum GLenum GLsizei count
GLfloat GLfloat f