Kohi Game Engine
vulkan_platform.h File Reference

This file contains the "front end interface" for where the platform and Vulkan meet. The implementation for this should exist in the corresponding .c file for a given platform. More...

#include <vulkan/vulkan_core.h>
#include <defines.h>
#include <platform/platform.h>

Go to the source code of this file.

Data Structures

struct  krhi_vulkan
 

Macros

#define RHI_VULKAN_DECL(name)   PFN_##name k##name
 

Typedefs

typedef struct krhi_vulkan krhi_vulkan
 

Functions

b8 vulkan_platform_create_vulkan_surface (struct vulkan_context *context, struct kwindow *window)
 Creates and assigns a surface to the given context. More...
 
void vulkan_platform_get_required_extension_names (const char ***names_darray)
 Appends the names of required extensions for this platform to the names_darray, which should be created and passed in. More...
 
b8 vulkan_platform_presentation_support (struct vulkan_context *context, struct VkPhysicalDevice_T *physical_device, u32 queue_family_index)
 
b8 vulkan_platform_initialize (krhi_vulkan *rhi)
 

Detailed Description

This file contains the "front end interface" for where the platform and Vulkan meet. The implementation for this should exist in the corresponding .c file for a given platform.

Author
Travis Vroman (travi.nosp@m.s@ko.nosp@m.hieng.nosp@m.ine..nosp@m.com)
Version
1.0
Date
2022-01-11

Macro Definition Documentation

◆ RHI_VULKAN_DECL

#define RHI_VULKAN_DECL (   name)    PFN_##name k##name

Typedef Documentation

◆ krhi_vulkan

typedef struct krhi_vulkan krhi_vulkan

Function Documentation

◆ vulkan_platform_create_vulkan_surface()

b8 vulkan_platform_create_vulkan_surface ( struct vulkan_context context,
struct kwindow window 
)

Creates and assigns a surface to the given context.

Parameters
contextA pointer to the Vulkan context.
Returns
True on success; otherwise false.

◆ vulkan_platform_get_required_extension_names()

void vulkan_platform_get_required_extension_names ( const char ***  names_darray)

Appends the names of required extensions for this platform to the names_darray, which should be created and passed in.

Parameters
names_darrayA pointer to the array names of required extension names. Must be a darray as this function adds names to the array.

◆ vulkan_platform_initialize()

b8 vulkan_platform_initialize ( krhi_vulkan rhi)

◆ vulkan_platform_presentation_support()

b8 vulkan_platform_presentation_support ( struct vulkan_context context,
struct VkPhysicalDevice_T *  physical_device,
u32  queue_family_index 
)

Indicates if the given device/queue family index combo supports presentation.