mirror of
https://github.com/Drezil/imgui.git
synced 2024-12-19 06:26:35 +00:00
Examples: NULL pointers for consistency.
This commit is contained in:
parent
baef79415b
commit
997d1bd0eb
@ -361,7 +361,7 @@ static void setup_vulkan(SDL_Window* window, const char** extensions, uint32_t e
|
|||||||
g_PresentMode = VK_PRESENT_MODE_FIFO_KHR;
|
g_PresentMode = VK_PRESENT_MODE_FIFO_KHR;
|
||||||
#endif
|
#endif
|
||||||
uint32_t count = 0;
|
uint32_t count = 0;
|
||||||
vkGetPhysicalDeviceSurfacePresentModesKHR(g_Gpu, g_Surface, &count, nullptr);
|
vkGetPhysicalDeviceSurfacePresentModesKHR(g_Gpu, g_Surface, &count, NULL);
|
||||||
VkPresentModeKHR* presentModes = (VkPresentModeKHR*)malloc(sizeof(VkQueueFamilyProperties) * count);
|
VkPresentModeKHR* presentModes = (VkPresentModeKHR*)malloc(sizeof(VkQueueFamilyProperties) * count);
|
||||||
vkGetPhysicalDeviceSurfacePresentModesKHR(g_Gpu, g_Surface, &count, presentModes);
|
vkGetPhysicalDeviceSurfacePresentModesKHR(g_Gpu, g_Surface, &count, presentModes);
|
||||||
bool presentModeAvailable = false;
|
bool presentModeAvailable = false;
|
||||||
@ -604,7 +604,7 @@ int main(int, char**)
|
|||||||
|
|
||||||
// Setup Vulkan
|
// Setup Vulkan
|
||||||
uint32_t extensions_count;
|
uint32_t extensions_count;
|
||||||
SDL_Vulkan_GetInstanceExtensions(window, &extensions_count, nullptr);
|
SDL_Vulkan_GetInstanceExtensions(window, &extensions_count, NULL);
|
||||||
const char** sdl_extensions = new const char*[extensions_count];
|
const char** sdl_extensions = new const char*[extensions_count];
|
||||||
SDL_Vulkan_GetInstanceExtensions(window, &extensions_count, sdl_extensions);
|
SDL_Vulkan_GetInstanceExtensions(window, &extensions_count, sdl_extensions);
|
||||||
setup_vulkan(window, sdl_extensions, extensions_count);
|
setup_vulkan(window, sdl_extensions, extensions_count);
|
||||||
|
@ -360,7 +360,7 @@ static void setup_vulkan(GLFWwindow* window, const char** extensions, uint32_t e
|
|||||||
g_PresentMode = VK_PRESENT_MODE_FIFO_KHR;
|
g_PresentMode = VK_PRESENT_MODE_FIFO_KHR;
|
||||||
#endif
|
#endif
|
||||||
uint32_t count = 0;
|
uint32_t count = 0;
|
||||||
vkGetPhysicalDeviceSurfacePresentModesKHR(g_Gpu, g_Surface, &count, nullptr);
|
vkGetPhysicalDeviceSurfacePresentModesKHR(g_Gpu, g_Surface, &count, NULL);
|
||||||
VkPresentModeKHR* presentModes = (VkPresentModeKHR*)malloc(sizeof(VkQueueFamilyProperties) * count);
|
VkPresentModeKHR* presentModes = (VkPresentModeKHR*)malloc(sizeof(VkQueueFamilyProperties) * count);
|
||||||
vkGetPhysicalDeviceSurfacePresentModesKHR(g_Gpu, g_Surface, &count, presentModes);
|
vkGetPhysicalDeviceSurfacePresentModesKHR(g_Gpu, g_Surface, &count, presentModes);
|
||||||
bool presentModeAvailable = false;
|
bool presentModeAvailable = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user