GlistEngine
Loading...
Searching...
No Matches
gVKCommands.h
Go to the documentation of this file.
1/*
2 * gVKCommands.h
3 *
4 * Command pool and command buffers of the Vulkan backend. Vulkan never executes a
5 * command directly: commands are recorded into a command buffer and submitted to a
6 * queue as a batch.
7 * Created by: Efe Arda Palali.
8 */
9
10#pragma once
11
12#ifndef CORE_GVKCOMMANDS_H
13#define CORE_GVKCOMMANDS_H
14
15#include "gVKContext.h"
16
17#ifdef GVK_VULKAN
18
19/*
20 * Creates the command pool on the graphics queue family and allocates
21 * GVK_MAX_FRAMES_IN_FLIGHT primary command buffers from it. The pool is created
22 * with the reset flag because every frame re-records its buffer.
23 */
24bool gvkCreateCommandResources(gVKContext& ctx);
25
26/*
27 * Destroys the pool, which frees the command buffers with it. Safe to call twice.
28 */
29void gvkDestroyCommandResources(gVKContext& ctx);
30
31#endif /* GVK_VULKAN */
32
33#endif /* CORE_GVKCOMMANDS_H */