GlistEngine
Loading...
Searching...
No Matches
gVKFrame.h
Go to the documentation of this file.
1/*
2 * gVKFrame.h
3 *
4 * The Vulkan frame loop: acquire an image, record the command buffer, submit it
5 * and present the result. This is the module the engine's main loop drives.
6 * Created by: Mehmet Fatih Okur.
7 */
8
9#pragma once
10
11#ifndef CORE_GVKFRAME_H
12#define CORE_GVKFRAME_H
13
14#include "gVKContext.h"
15
16#ifdef GVK_VULKAN
17
18class gBaseWindow;
19
20/*
21 * Waits for the previous use of this frame slot, acquires a swapchain image and
22 * begins recording the render pass with ctx.clearvalue. Returns false when the
23 * frame has to be skipped, for example because the swapchain was rebuilt; the
24 * caller must not call gvkEndFrame in that case.
25 */
26bool gvkBeginFrame(gVKContext& ctx, gBaseWindow* window);
27
28/*
29 * Ends the render pass, submits the command buffer and presents the image, then
30 * advances to the next frame slot.
31 */
32bool gvkEndFrame(gVKContext& ctx, gBaseWindow* window);
33
34#endif /* GVK_VULKAN */
35
36#endif /* CORE_GVKFRAME_H */
Definition gBaseWindow.h:29