From 5b686de0f6e28743c2c1f0c9e5212adc85c63986 Mon Sep 17 00:00:00 2001 From: RP Singh Date: Tue, 23 Apr 2024 10:10:06 +0530 Subject: [PATCH] Update README.md --- README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/README.md b/README.md index 3cf72bc..2278efc 100644 --- a/README.md +++ b/README.md @@ -5,3 +5,32 @@ PlayVk is a single header file library for simplifying vulkan objects creation, initializing vulkan, and rendering basic geometries.

Buy Me A Coffee + +## Documentation + +### Functions +* **pvkCreateVulkanInstanceWithExtensions**: Creates VkInstance instance + * Param 1 (integer): is the number of extensions we require + * Param 2 (variadic): is a variadic argument consisting of list of `const char*` strings representing the extensions required. +```C +VkInstance instance = pvkCreateVulkanInstanceWithExtensions(2, "VK_KHR_win32_surface", "VK_KHR_surface"); +```` + +* **pvkWindowCreate**: Creates Win32 Window + * Param 1 (integer): width of the window + * Param 2 (integer): height of the window + * Param 3 (const char*): Name of the window (which is displayed in the title bar) + * Param 4 (bool): whether the window need to be created in full screen mode + * Param 5 (bool): whether the window should be resizable +```C +PvkWindow* window = pvkWindowCreate(800, 800, "Vulkan Multipass Rendering", false, true); +``` + +* **pvkWindowCreateVulkanSurface**: Creates Vulkan surface (VkSurfaceKHR) + * Param 1 (PvkWindow*): pointer to PvkWindow object, created with `pvkWindowCreate` function + * Param 2 (VkInstance): vulkan instance object +```C +VkInstance instance = ... +PvkWindow* window = ... +VkSurfaceKHR surface = pvkWindowCreateVulkanSurface(window, instance); +```