fixed instance creation on linux
This commit is contained in:
parent
8fa90e10b1
commit
db5a728846
1 changed files with 11 additions and 13 deletions
|
|
@ -8,8 +8,9 @@
|
||||||
const char *extensions[] = {
|
const char *extensions[] = {
|
||||||
#ifdef PLATFORM_MACOS
|
#ifdef PLATFORM_MACOS
|
||||||
VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME,
|
VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME,
|
||||||
VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME
|
VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME,
|
||||||
#endif
|
#endif
|
||||||
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
|
@ -23,21 +24,18 @@ const char *layers[] = {NULL};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Vulkan is modular by design. This means that
|
* Vulkan is modular by design. This means that some features that might not be
|
||||||
* some features that might not be always needed
|
* always needed are not enabled by default. To enable those features (like
|
||||||
* are not enabled by default. To enable those
|
* macOS platform compatibility or windowing) extensions are needed. This
|
||||||
* features (like macOS platform compatibility
|
* function checks which extensions are required by RGFW and adds extensions
|
||||||
* or windowing) extensions are needed. This
|
* required by the game itself.
|
||||||
* function checks which extensions are required
|
|
||||||
* by RGFW and adds extensions required by the
|
|
||||||
* game itself.
|
|
||||||
*/
|
*/
|
||||||
const char **vk_instance_extensions(usize * count)
|
const char **vk_instance_extensions(usize * count)
|
||||||
{
|
{
|
||||||
usize rgfw_extension_count = 0;
|
usize rgfw_extension_count = 0;
|
||||||
const char **rgfw_extensions = RGFW_getRequiredInstanceExtensions_Vulkan(&rgfw_extension_count);
|
const char **rgfw_extensions = RGFW_getRequiredInstanceExtensions_Vulkan(&rgfw_extension_count);
|
||||||
|
|
||||||
usize extension_count = sizeof(extensions)/sizeof(extensions[0]);
|
usize extension_count = sizeof(extensions) / sizeof(extensions[0]) - 1;
|
||||||
*count = rgfw_extension_count + extension_count;
|
*count = rgfw_extension_count + extension_count;
|
||||||
const char **instance_extensions = malloc(*count * sizeof(char *));
|
const char **instance_extensions = malloc(*count * sizeof(char *));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue