sdl/vulkan: add links to documentation
@@ -66,6 +66,7 @@ import (
)
// VulkanLoadLibrary dynamically loads a Vulkan loader library.
+// (https://wiki.libsdl.org/SDL_Vulkan_LoadLibrary)
func VulkanLoadLibrary(path string) error {
var ret C.int
if path == "" {
@@ -82,16 +83,19 @@ func VulkanLoadLibrary(path string) error {
}
// VulkanGetVkGetInstanceProcAddr gets the address of the vkGetInstanceProcAddr function.
+// (https://wiki.libsdl.org/SDL_Vulkan_GetVkInstanceProcAddr)
func VulkanGetVkGetInstanceProcAddr() unsafe.Pointer {
return C.SDL_Vulkan_GetVkGetInstanceProcAddr()
}
// VulkanUnloadLibrary unloads the Vulkan loader library previously loaded by VulkanLoadLibrary().
+// (https://wiki.libsdl.org/SDL_Vulkan_UnloadLibrary)
func VulkanUnloadLibrary() {
C.SDL_Vulkan_UnloadLibrary()
}
// VulkanGetInstanceExtensions gets the names of the Vulkan instance extensions needed to create a surface with VulkanCreateSurface().
+// (https://wiki.libsdl.org/SDL_Vulkan_GetInstanceExtensions)
func (window *Window) VulkanGetInstanceExtensions() []string {
var count C.uint
C.SDL_Vulkan_GetInstanceExtensions(window.cptr(), &count, nil)
@@ -109,6 +113,7 @@ func (window *Window) VulkanGetInstanceExtensions() []string {
}
// VulkanCreateSurface creates a Vulkan rendering surface for a window.
+// (https://wiki.libsdl.org/SDL_Vulkan_CreateSurface)
func (window *Window) VulkanCreateSurface(instance interface{}) (surface uintptr, err error) {
if instance == nil {
return 0, errors.New("vulkan: instance is nil")
@@ -128,6 +133,7 @@ func (window *Window) VulkanCreateSurface(instance interface{}) (surface uintptr
}
// VulkanGetDrawableSize gets the size of a window's underlying drawable in pixels (for use with setting viewport, scissor & etc).
+// (https://wiki.libsdl.org/SDL_Vulkan_GetDrawableSize)
func (window *Window) VulkanGetDrawableSize() (w, h int32) {
var _w, _h C.int
C.SDL_Vulkan_GetDrawableSize(window.cptr(), &_w, &_h)
