mirror of
https://github.com/glfw/glfw.git
synced 2024-11-26 03:52:01 +00:00
Make use of uint32_t where appropriate
This change does not affect the ABI.
This commit is contained in:
parent
5661d03be8
commit
7ab7d8b4b1
@ -127,7 +127,7 @@ To query the instance extensions required, call @ref
|
|||||||
glfwGetRequiredInstanceExtensions.
|
glfwGetRequiredInstanceExtensions.
|
||||||
|
|
||||||
@code
|
@code
|
||||||
unsigned int count;
|
uint32_t count;
|
||||||
const char** extensions = glfwGetRequiredInstanceExtensions(&count);
|
const char** extensions = glfwGetRequiredInstanceExtensions(&count);
|
||||||
@endcode
|
@endcode
|
||||||
|
|
||||||
|
@ -4029,7 +4029,7 @@ GLFWAPI int glfwVulkanSupported(void);
|
|||||||
*
|
*
|
||||||
* @ingroup vulkan
|
* @ingroup vulkan
|
||||||
*/
|
*/
|
||||||
GLFWAPI const char** glfwGetRequiredInstanceExtensions(unsigned int* count);
|
GLFWAPI const char** glfwGetRequiredInstanceExtensions(uint32_t* count);
|
||||||
|
|
||||||
#if defined(VK_VERSION_1_0)
|
#if defined(VK_VERSION_1_0)
|
||||||
|
|
||||||
|
@ -1577,7 +1577,7 @@ const char* _glfwPlatformGetClipboardString(_GLFWwindow* window)
|
|||||||
return _glfw.ns.clipboardString;
|
return _glfw.ns.clipboardString;
|
||||||
}
|
}
|
||||||
|
|
||||||
char** _glfwPlatformGetRequiredInstanceExtensions(unsigned int* count)
|
char** _glfwPlatformGetRequiredInstanceExtensions(uint32_t* count)
|
||||||
{
|
{
|
||||||
*count = 0;
|
*count = 0;
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -1585,7 +1585,7 @@ char** _glfwPlatformGetRequiredInstanceExtensions(unsigned int* count)
|
|||||||
|
|
||||||
int _glfwPlatformGetPhysicalDevicePresentationSupport(VkInstance instance,
|
int _glfwPlatformGetPhysicalDevicePresentationSupport(VkInstance instance,
|
||||||
VkPhysicalDevice device,
|
VkPhysicalDevice device,
|
||||||
unsigned int queuefamily)
|
uint32_t queuefamily)
|
||||||
{
|
{
|
||||||
return GLFW_FALSE;
|
return GLFW_FALSE;
|
||||||
}
|
}
|
||||||
|
@ -92,8 +92,8 @@ typedef const GLubyte* (APIENTRY * PFNGLGETSTRINGIPROC)(GLenum,GLuint);
|
|||||||
typedef void* VkInstance;
|
typedef void* VkInstance;
|
||||||
typedef void* VkPhysicalDevice;
|
typedef void* VkPhysicalDevice;
|
||||||
typedef uint64_t VkSurfaceKHR;
|
typedef uint64_t VkSurfaceKHR;
|
||||||
typedef unsigned int VkFlags;
|
typedef uint32_t VkFlags;
|
||||||
typedef unsigned int VkBool32;
|
typedef uint32_t VkBool32;
|
||||||
|
|
||||||
typedef enum VkStructureType
|
typedef enum VkStructureType
|
||||||
{
|
{
|
||||||
@ -138,12 +138,12 @@ typedef struct VkAllocationCallbacks VkAllocationCallbacks;
|
|||||||
typedef struct VkExtensionProperties
|
typedef struct VkExtensionProperties
|
||||||
{
|
{
|
||||||
char extensionName[256];
|
char extensionName[256];
|
||||||
unsigned int specVersion;
|
uint32_t specVersion;
|
||||||
} VkExtensionProperties;
|
} VkExtensionProperties;
|
||||||
|
|
||||||
typedef void (APIENTRY * PFN_vkVoidFunction)(void);
|
typedef void (APIENTRY * PFN_vkVoidFunction)(void);
|
||||||
typedef PFN_vkVoidFunction (APIENTRY * PFN_vkGetInstanceProcAddr)(VkInstance,const char*);
|
typedef PFN_vkVoidFunction (APIENTRY * PFN_vkGetInstanceProcAddr)(VkInstance,const char*);
|
||||||
typedef VkResult (APIENTRY * PFN_vkEnumerateInstanceExtensionProperties)(const char*,unsigned int*,VkExtensionProperties*);
|
typedef VkResult (APIENTRY * PFN_vkEnumerateInstanceExtensionProperties)(const char*,uint32_t*,VkExtensionProperties*);
|
||||||
|
|
||||||
#define vkEnumerateInstanceExtensionProperties _glfw.vk.EnumerateInstanceExtensionProperties
|
#define vkEnumerateInstanceExtensionProperties _glfw.vk.EnumerateInstanceExtensionProperties
|
||||||
#define vkGetInstanceProcAddr _glfw.vk.GetInstanceProcAddr
|
#define vkGetInstanceProcAddr _glfw.vk.GetInstanceProcAddr
|
||||||
@ -437,7 +437,7 @@ struct _GLFWlibrary
|
|||||||
GLFWbool available;
|
GLFWbool available;
|
||||||
void* handle;
|
void* handle;
|
||||||
char** extensions;
|
char** extensions;
|
||||||
unsigned int extensionCount;
|
uint32_t extensionCount;
|
||||||
PFN_vkEnumerateInstanceExtensionProperties EnumerateInstanceExtensionProperties;
|
PFN_vkEnumerateInstanceExtensionProperties EnumerateInstanceExtensionProperties;
|
||||||
PFN_vkGetInstanceProcAddr GetInstanceProcAddr;
|
PFN_vkGetInstanceProcAddr GetInstanceProcAddr;
|
||||||
GLFWbool KHR_surface;
|
GLFWbool KHR_surface;
|
||||||
@ -799,11 +799,11 @@ void _glfwPlatformSetCursor(_GLFWwindow* window, _GLFWcursor* cursor);
|
|||||||
|
|
||||||
/*! @ingroup platform
|
/*! @ingroup platform
|
||||||
*/
|
*/
|
||||||
char** _glfwPlatformGetRequiredInstanceExtensions(unsigned int* count);
|
char** _glfwPlatformGetRequiredInstanceExtensions(uint32_t* count);
|
||||||
|
|
||||||
/*! @ingroup platform
|
/*! @ingroup platform
|
||||||
*/
|
*/
|
||||||
int _glfwPlatformGetPhysicalDevicePresentationSupport(VkInstance instance, VkPhysicalDevice device, unsigned int queuefamily);
|
int _glfwPlatformGetPhysicalDevicePresentationSupport(VkInstance instance, VkPhysicalDevice device, uint32_t queuefamily);
|
||||||
|
|
||||||
/*! @ingroup platform
|
/*! @ingroup platform
|
||||||
*/
|
*/
|
||||||
|
@ -754,7 +754,7 @@ const char* _glfwPlatformGetClipboardString(_GLFWwindow* window)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
char** _glfwPlatformGetRequiredInstanceExtensions(unsigned int* count)
|
char** _glfwPlatformGetRequiredInstanceExtensions(uint32_t* count)
|
||||||
{
|
{
|
||||||
char** extensions;
|
char** extensions;
|
||||||
|
|
||||||
@ -773,7 +773,7 @@ char** _glfwPlatformGetRequiredInstanceExtensions(unsigned int* count)
|
|||||||
|
|
||||||
int _glfwPlatformGetPhysicalDevicePresentationSupport(VkInstance instance,
|
int _glfwPlatformGetPhysicalDevicePresentationSupport(VkInstance instance,
|
||||||
VkPhysicalDevice device,
|
VkPhysicalDevice device,
|
||||||
unsigned int queuefamily)
|
uint32_t queuefamily)
|
||||||
{
|
{
|
||||||
PFN_vkGetPhysicalDeviceMirPresentationSupportKHR vkGetPhysicalDeviceMirPresentationSupportKHR =
|
PFN_vkGetPhysicalDeviceMirPresentationSupportKHR vkGetPhysicalDeviceMirPresentationSupportKHR =
|
||||||
(PFN_vkGetPhysicalDeviceMirPresentationSupportKHR)
|
(PFN_vkGetPhysicalDeviceMirPresentationSupportKHR)
|
||||||
|
@ -40,7 +40,7 @@ void _glfwInitVulkan(void)
|
|||||||
{
|
{
|
||||||
VkResult err;
|
VkResult err;
|
||||||
VkExtensionProperties* ep;
|
VkExtensionProperties* ep;
|
||||||
unsigned int i, count;
|
uint32_t i, count;
|
||||||
#if defined(_GLFW_WIN32)
|
#if defined(_GLFW_WIN32)
|
||||||
const char* name = "vulkan-1.dll";
|
const char* name = "vulkan-1.dll";
|
||||||
#else
|
#else
|
||||||
@ -120,7 +120,7 @@ void _glfwInitVulkan(void)
|
|||||||
|
|
||||||
void _glfwTerminateVulkan(void)
|
void _glfwTerminateVulkan(void)
|
||||||
{
|
{
|
||||||
unsigned int i;
|
uint32_t i;
|
||||||
|
|
||||||
for (i = 0; i < _glfw.vk.extensionCount; i++)
|
for (i = 0; i < _glfw.vk.extensionCount; i++)
|
||||||
free(_glfw.vk.extensions[i]);
|
free(_glfw.vk.extensions[i]);
|
||||||
@ -196,7 +196,7 @@ GLFWAPI int glfwVulkanSupported(void)
|
|||||||
return _glfw.vk.available;
|
return _glfw.vk.available;
|
||||||
}
|
}
|
||||||
|
|
||||||
GLFWAPI const char** glfwGetRequiredInstanceExtensions(unsigned int* count)
|
GLFWAPI const char** glfwGetRequiredInstanceExtensions(uint32_t* count)
|
||||||
{
|
{
|
||||||
*count = 0;
|
*count = 0;
|
||||||
|
|
||||||
|
@ -1601,7 +1601,7 @@ const char* _glfwPlatformGetClipboardString(_GLFWwindow* window)
|
|||||||
return _glfw.win32.clipboardString;
|
return _glfw.win32.clipboardString;
|
||||||
}
|
}
|
||||||
|
|
||||||
char** _glfwPlatformGetRequiredInstanceExtensions(unsigned int* count)
|
char** _glfwPlatformGetRequiredInstanceExtensions(uint32_t* count)
|
||||||
{
|
{
|
||||||
char** extensions;
|
char** extensions;
|
||||||
|
|
||||||
@ -1620,7 +1620,7 @@ char** _glfwPlatformGetRequiredInstanceExtensions(unsigned int* count)
|
|||||||
|
|
||||||
int _glfwPlatformGetPhysicalDevicePresentationSupport(VkInstance instance,
|
int _glfwPlatformGetPhysicalDevicePresentationSupport(VkInstance instance,
|
||||||
VkPhysicalDevice device,
|
VkPhysicalDevice device,
|
||||||
unsigned int queuefamily)
|
uint32_t queuefamily)
|
||||||
{
|
{
|
||||||
PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR vkGetPhysicalDeviceWin32PresentationSupportKHR =
|
PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR vkGetPhysicalDeviceWin32PresentationSupportKHR =
|
||||||
(PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)
|
(PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)
|
||||||
|
@ -847,7 +847,7 @@ const char* _glfwPlatformGetClipboardString(_GLFWwindow* window)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
char** _glfwPlatformGetRequiredInstanceExtensions(unsigned int* count)
|
char** _glfwPlatformGetRequiredInstanceExtensions(uint32_t* count)
|
||||||
{
|
{
|
||||||
char** extensions;
|
char** extensions;
|
||||||
|
|
||||||
@ -866,7 +866,7 @@ char** _glfwPlatformGetRequiredInstanceExtensions(unsigned int* count)
|
|||||||
|
|
||||||
int _glfwPlatformGetPhysicalDevicePresentationSupport(VkInstance instance,
|
int _glfwPlatformGetPhysicalDevicePresentationSupport(VkInstance instance,
|
||||||
VkPhysicalDevice device,
|
VkPhysicalDevice device,
|
||||||
unsigned int queuefamily)
|
uint32_t queuefamily)
|
||||||
{
|
{
|
||||||
PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR vkGetPhysicalDeviceWaylandPresentationSupportKHR =
|
PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR vkGetPhysicalDeviceWaylandPresentationSupportKHR =
|
||||||
(PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR)
|
(PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR)
|
||||||
|
@ -2273,7 +2273,7 @@ const char* _glfwPlatformGetClipboardString(_GLFWwindow* window)
|
|||||||
return _glfw.x11.clipboardString;
|
return _glfw.x11.clipboardString;
|
||||||
}
|
}
|
||||||
|
|
||||||
char** _glfwPlatformGetRequiredInstanceExtensions(unsigned int* count)
|
char** _glfwPlatformGetRequiredInstanceExtensions(uint32_t* count)
|
||||||
{
|
{
|
||||||
char** extensions;
|
char** extensions;
|
||||||
|
|
||||||
@ -2299,7 +2299,7 @@ char** _glfwPlatformGetRequiredInstanceExtensions(unsigned int* count)
|
|||||||
|
|
||||||
int _glfwPlatformGetPhysicalDevicePresentationSupport(VkInstance instance,
|
int _glfwPlatformGetPhysicalDevicePresentationSupport(VkInstance instance,
|
||||||
VkPhysicalDevice device,
|
VkPhysicalDevice device,
|
||||||
unsigned int queuefamily)
|
uint32_t queuefamily)
|
||||||
{
|
{
|
||||||
VisualID visualID = XVisualIDFromVisual(DefaultVisual(_glfw.x11.display,
|
VisualID visualID = XVisualIDFromVisual(DefaultVisual(_glfw.x11.display,
|
||||||
_glfw.x11.screen));
|
_glfw.x11.screen));
|
||||||
|
Loading…
Reference in New Issue
Block a user