This repository was archived by the owner on Nov 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathoverlay.h
More file actions
44 lines (35 loc) · 1.24 KB
/
Copy pathoverlay.h
File metadata and controls
44 lines (35 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef OVERLAY_H
#define OVERLAY_H 1
#define GLFW_INCLUDE_VULKAN
#include "vulkan/vulkan.h"
#include <GLFW/glfw3.h>
#ifdef __cplusplus
extern "C" {
#endif
enum { UP, DOWN };
struct overlay_settings {
float bg_color[4];
uint8_t orientation;
int zoom;
};
// hmmm maybe introduce a struct for this?
void init_overlay(GLFWwindow *_win, VkDevice logical_device,
VkPhysicalDevice physical_device,
uint32_t graphics_queue_family_index, VkQueue graphics_queue,
VkImageView *image_views, uint32_t image_views_len,
uint32_t width, uint32_t height, VkFormat color_format);
void resize_overlay(uint32_t width, uint32_t height);
// buffer index is the framebuffer index that is to be rendered to
// use the render finished semaphore of the main program so that
// the overlay has the chance to wait for the main programm to finish
// and then render the overlay on top. Will return a Semaphore that
// that the main program can wait vor
VkSemaphore submit_overlay(struct overlay_settings *settings,
VkQueue graphics_queue, uint32_t buffer_index,
VkSemaphore wait_semaphore);
// cleanup
void shutdown_overlay();
#ifdef __cplusplus
}
#endif
#endif