src/video/SDL_vulkan_internal.h
author Sam Lantinga <slouken@libsdl.org>
Sun, 27 Aug 2017 23:13:15 -0700
changeset 11376 91e5e5a2cb71
parent 11367 e8fc755a89e8
child 11380 bb5404c6b2e0
permissions -rw-r--r--
Fixed typedef redefinition errors when including both SDL_vulkan.h and vulkan.h
You should always include vulkan/vulkan.h first, then include SDL_vulkan.h
icculus@11365
     1
/*
icculus@11365
     2
  Simple DirectMedia Layer
icculus@11365
     3
  Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
icculus@11365
     4
icculus@11365
     5
  This software is provided 'as-is', without any express or implied
icculus@11365
     6
  warranty.  In no event will the authors be held liable for any damages
icculus@11365
     7
  arising from the use of this software.
icculus@11365
     8
icculus@11365
     9
  Permission is granted to anyone to use this software for any purpose,
icculus@11365
    10
  including commercial applications, and to alter it and redistribute it
icculus@11365
    11
  freely, subject to the following restrictions:
icculus@11365
    12
icculus@11365
    13
  1. The origin of this software must not be misrepresented; you must not
icculus@11365
    14
     claim that you wrote the original software. If you use this software
icculus@11365
    15
     in a product, an acknowledgment in the product documentation would be
icculus@11365
    16
     appreciated but is not required.
icculus@11365
    17
  2. Altered source versions must be plainly marked as such, and must not be
icculus@11365
    18
     misrepresented as being the original software.
icculus@11365
    19
  3. This notice may not be removed or altered from any source distribution.
icculus@11365
    20
*/
slouken@11376
    21
#ifndef SDL_vulkan_internal_h_
slouken@11376
    22
#define SDL_vulkan_internal_h_
icculus@11365
    23
icculus@11365
    24
#include "../SDL_internal.h"
icculus@11365
    25
icculus@11365
    26
#include "SDL_stdinc.h"
icculus@11365
    27
icculus@11365
    28
#if defined(SDL_LOADSO_DISABLED)
icculus@11365
    29
#undef SDL_VIDEO_VULKAN_SURFACE
icculus@11365
    30
#define SDL_VIDEO_VULKAN_SURFACE 0
icculus@11365
    31
#endif
icculus@11365
    32
icculus@11365
    33
#if SDL_VIDEO_DRIVER_ANDROID
icculus@11365
    34
#define VK_USE_PLATFORM_ANDROID_KHR
icculus@11365
    35
#endif
icculus@11365
    36
#if SDL_VIDEO_DRIVER_COCOA
icculus@11365
    37
#define VK_USE_PLATFORM_MACOS_MVK
icculus@11365
    38
#endif
icculus@11365
    39
#if SDL_VIDEO_DRIVER_MIR
icculus@11365
    40
#define VK_USE_PLATFORM_MIR_KHR
icculus@11365
    41
#endif
icculus@11365
    42
#if SDL_VIDEO_DRIVER_UIKIT
icculus@11365
    43
#define VK_USE_PLATFORM_IOS_MVK
icculus@11365
    44
#endif
icculus@11365
    45
#if SDL_VIDEO_DRIVER_WAYLAND
icculus@11365
    46
#define VK_USE_PLATFORM_WAYLAND_KHR
icculus@11365
    47
#endif
icculus@11365
    48
#if SDL_VIDEO_DRIVER_WINDOWS
icculus@11365
    49
#define VK_USE_PLATFORM_WIN32_KHR
icculus@11365
    50
#endif
icculus@11365
    51
#if SDL_VIDEO_DRIVER_X11
icculus@11365
    52
#define VK_USE_PLATFORM_XLIB_KHR
icculus@11365
    53
#define VK_USE_PLATFORM_XCB_KHR
icculus@11365
    54
#endif
icculus@11365
    55
icculus@11365
    56
#define VK_NO_PROTOTYPES
icculus@11367
    57
#include "./khronos/vulkan/vulkan.h"
icculus@11365
    58
slouken@11376
    59
#include "SDL_vulkan.h"
slouken@11376
    60
slouken@11376
    61
#if SDL_VIDEO_VULKAN_SURFACE
slouken@11376
    62
icculus@11365
    63
extern const char *SDL_Vulkan_GetResultString(VkResult result);
icculus@11365
    64
icculus@11365
    65
extern VkExtensionProperties *SDL_Vulkan_CreateInstanceExtensionsList(
icculus@11365
    66
    PFN_vkEnumerateInstanceExtensionProperties vkEnumerateInstanceExtensionProperties,
icculus@11365
    67
    Uint32 *extensionCount); /* free returned list with SDL_free */
icculus@11365
    68
icculus@11365
    69
/* Implements functionality of SDL_Vulkan_GetInstanceExtensions for a list of
icculus@11365
    70
 * names passed in nameCount and names. */
icculus@11365
    71
extern SDL_bool SDL_Vulkan_GetInstanceExtensions_Helper(unsigned *userCount,
icculus@11365
    72
                                                        const char **userNames,
icculus@11365
    73
                                                        unsigned nameCount,
icculus@11365
    74
                                                        const char *const *names);
slouken@11376
    75
#endif /* SDL_VIDEO_VULKAN_SURFACE */
icculus@11365
    76
slouken@11376
    77
#endif /* SDL_vulkan_internal_h_ */
icculus@11365
    78
icculus@11365
    79
/* vi: set ts=4 sw=4 expandtab: */