3#include <QGuiApplication>
4#include <QVulkanDeviceFunctions>
5#include <QVulkanWindow>
19 m_devFuncs = m_window->vulkanInstance()->deviceFunctions(m_window->device());
28 VkCommandBuffer cmdBuf = m_window->currentCommandBuffer();
32 m_window->frameReady();
48int main(
int argc,
char *argv[])
54 inst.setLayers({
"VK_LAYER_KHRONOS_validation" });
56 qFatal(
"Failed to create Vulkan instance: %d", inst.errorCode());
59 w.setVulkanInstance(&inst);
68 void startNextFrame();
71 VkDescriptorBufferInfo m_uniformBufInfo[QVulkanWindow::MAX_CONCURRENT_FRAME_COUNT];
75 void Renderer::startNextFrame()
77 VkDescriptorBufferInfo &uniformBufInfo(m_uniformBufInfo[m_window->currentFrame()]);
89 void startNextFrame();
92 VkDescriptorBufferInfo m_uniformBufInfo[QVulkanWindow::MAX_CONCURRENT_FRAME_COUNT];
96 void Renderer::startNextFrame()
98 const int count = m_window->concurrentFrameCount();
static int exec()
Enters the main event loop and waits until exit() is called, then returns the value that was set to e...
The QVulkanDeviceFunctions class provides cross-platform access to the device level core Vulkan 1....
The QVulkanInstance class represents a native Vulkan instance, enabling Vulkan rendering onto a QSurf...
VulkanRenderer(QVulkanWindow *w)
void initResources() override
void initSwapChainResources() override
void releaseResources() override
void startNextFrame() override
void releaseSwapChainResources() override
QVulkanWindowRenderer * createRenderer() override
VkSubpassContents contents
VkCommandBuffer commandBuffer
const VkRenderPassBeginInfo * renderPassBegin
GLfloat GLfloat GLfloat w
[0]
GLenum GLenum GLsizei count
QApplication app(argc, argv)
[0]