Vulkan2D
2D renderer written in C using Vulkan and SDL2
Loading...
Searching...
No Matches
nuklear_sdl_vulkan.h
1// Special thanks to Github user @cmburn for the modified version of this header.
2/*
3 * Nuklear - 1.32.0 - public domain
4 * no warranty implied; use at your own risk.
5 * authored from 2015-2016 by Micha Mettke
6 */
7/*
8 * ==============================================================
9 *
10 * API
11 *
12 * ===============================================================
13 */
14#ifndef NK_SDL_VULKAN_H_
15#define NK_SDL_VULKAN_H_
16
17#include <assert.h>
18#include <stddef.h>
19#include <string.h>
20#include <SDL3/SDL.h>
21
22enum nk_sdl_init_state { NK_SDL_DEFAULT = 0 };
23
24NK_API struct nk_context *nk_sdl_init(SDL_Window *win, VkDevice logical_device,
25 VkPhysicalDevice physical_device, uint32_t graphics_queue_family_index,
26 VkImageView *image_views, uint32_t image_views_len, VkFormat color_format,
27 enum nk_sdl_init_state init_state, VkDeviceSize max_vertex_buffer,
28 VkDeviceSize max_element_buffer);
29NK_API void nk_sdl_shutdown(void);
30NK_API void nk_sdl_font_stash_begin(struct nk_font_atlas **atlas);
31NK_API void nk_sdl_font_stash_end(VkQueue graphics_queue);
32NK_API int nk_sdl_handle_event(SDL_Event *evt);
33NK_API VkSemaphore nk_sdl_render(VkQueue graphics_queue, uint32_t buffer_index,
34 VkSemaphore wait_semaphore, enum nk_anti_aliasing AA);
35NK_API void nk_sdl_resize(VkImageView *imageViews, uint32_t imageViewCount, uint32_t framebuffer_width,
36 uint32_t framebuffer_height);
37NK_API void nk_sdl_device_destroy(void);
38NK_API void nk_sdl_device_create(VkDevice logical_device,
39 VkPhysicalDevice physical_device, uint32_t graphics_queue_family_index,
40 VkImageView *image_views, uint32_t image_views_len, VkFormat color_format,
41 VkDeviceSize max_vertex_buffer, VkDeviceSize max_element_buffer,
42 uint32_t framebuffer_width, uint32_t framebuffer_height);
43NK_API void nk_sdl_handle_grab(void);
44
45#endif
46/*
47 * ==============================================================
48 *
49 * IMPLEMENTATION
50 *
51 * ===============================================================
52 */
53#define NK_SDL_VULKAN_IMPLEMENTATION
54#ifdef NK_SDL_VULKAN_IMPLEMENTATION
55#undef NK_SDL_VULKAN_IMPLEMENTATION
56
57
58#endif
Definition nuklear.h:5927