Kohi Game Engine
kwindow_renderer_backend_state Struct Reference

The Vulkan-specific backend window state. More...

#include <vulkan_types.h>

Data Fields

VkSurfaceKHR surface
 The internal Vulkan surface for the window to be drawn to. More...
 
vulkan_swapchain swapchain
 The swapchain. More...
 
u32 image_index
 The current image index. More...
 
u32 current_frame
 The current frame index ( % by max_frames_in_flight). More...
 
u8 max_frames_in_flight
 Indicates the max number of frames in flight. 1 for double-buffering, 2 for triple-buffering. More...
 
b8 recreating_swapchain
 Indicates if the swapchain is currently being recreated. More...
 
vulkan_command_buffergraphics_command_buffers
 The graphics command buffers, one per swapchain image. More...
 
VkSemaphore * image_available_semaphores
 The semaphores used to indicate image availability, one per frame in flight. More...
 
VkSemaphore * queue_complete_semaphores
 The semaphores used to indicate queue availability, one per frame in flight. More...
 
VkFence * in_flight_fences
 The in-flight fences, used to indicate to the application when a frame is busy/ready. One per frame in flight. More...
 
renderbufferstaging
 Resusable staging buffers (one per frame in flight) to transfer data from a resource to a GPU-only buffer. More...
 
khandle ** frame_texture_updated_list
 Array of darrays of handles to textures that were updated as part of a frame's workload. One list per frame in flight. More...
 
u64 framebuffer_size_generation
 
u64 framebuffer_previous_size_generation
 
u8 skip_frames
 

Detailed Description

The Vulkan-specific backend window state.

This owns all resources associated with the window (i.e swapchain) and anything tied to it or max_frames_in_flight (sync objects, staging buffer, command buffers, etc.).

Field Documentation

◆ current_frame

u32 current_frame

The current frame index ( % by max_frames_in_flight).

◆ frame_texture_updated_list

khandle** frame_texture_updated_list

Array of darrays of handles to textures that were updated as part of a frame's workload. One list per frame in flight.

◆ framebuffer_previous_size_generation

u64 framebuffer_previous_size_generation

◆ framebuffer_size_generation

u64 framebuffer_size_generation

◆ graphics_command_buffers

vulkan_command_buffer* graphics_command_buffers

The graphics command buffers, one per swapchain image.

◆ image_available_semaphores

VkSemaphore* image_available_semaphores

The semaphores used to indicate image availability, one per frame in flight.

◆ image_index

u32 image_index

The current image index.

◆ in_flight_fences

VkFence* in_flight_fences

The in-flight fences, used to indicate to the application when a frame is busy/ready. One per frame in flight.

◆ max_frames_in_flight

u8 max_frames_in_flight

Indicates the max number of frames in flight. 1 for double-buffering, 2 for triple-buffering.

◆ queue_complete_semaphores

VkSemaphore* queue_complete_semaphores

The semaphores used to indicate queue availability, one per frame in flight.

◆ recreating_swapchain

b8 recreating_swapchain

Indicates if the swapchain is currently being recreated.

◆ skip_frames

u8 skip_frames

◆ staging

renderbuffer* staging

Resusable staging buffers (one per frame in flight) to transfer data from a resource to a GPU-only buffer.

◆ surface

VkSurfaceKHR surface

The internal Vulkan surface for the window to be drawn to.

◆ swapchain

vulkan_swapchain swapchain

The swapchain.


The documentation for this struct was generated from the following file: