extensions

module
v1.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2022 License: MIT

README

vkngwrapper/core

Go Reference

Vkngwrapper (proununced "Viking Wrapper") is a handwritten cgo wrapper for the Vulkan graphics and compute API. The goal is to produce fast, easy-to-use, low-go-allocation, and idiomatic Go code to communicate with your graphics card and enable games and other graphical applications.

To learn more about how to use vkngwrapper, check out the core library. For the future roadmap, see the org page.

Using Extensions

Once you've gotten the hang of the core library, you may wish to make use of one of Vullkan's many extensions. This library provides first-class support for a small-but-growing list of Vulkan extensions. It's easy enough to use an extension: just like core 1.1 and core 1.2 in the core library, most of the contents of an extension are constants an structures, which can be accessed via the package name, usch as khr_imageless_framebuffer.FramebufferAttachmentImageInfo or khr_sampler_mirror_clamp_to_edge.SamplerAddressModeMirrorClampToEdge.

For extensions that add new commands, you can create an extension object using CreateExtensionFromInstance for instance extensions, or CreateExtensionFromDevice for device extensions. Commands can be called on the new Extension object. These methods will return nil if the Instance or Device was not created with the extension in question active. For your convenience, ExtensionName constants, such as khr_external_memory.ExtensionName are provided for all extensions, which you can pass to Instance/Device creation.

Example:

	debugLoader := ext_debug_utils.CreateExtensionFromInstance(instance)
	debugMessenger, _, err := debugLoader.CreateDebugUtilsMessenger(instance, nil, ext_debug_utils.DebugUtilsMessengerCreateInfo{
      MessageSeverity: ext_debug_utils.SeverityError | ext_debug_utils.SeverityWarning,
      MessageType:     ext_debug_utils.TypeGeneral | ext_debug_utils.TypeValidation | ext_debug_utils.TypePerformance,
      UserCallback:    logValidationFunc,
    })
	if err != nil {
		return err
	}

Supported Extensions

  • Three major extensions used by most applications developers: vk_ext_debug_utils, vk_khr_surface, and vk_khr_swapchain
  • vk_khr_portability_subset and vk_khr_portability_enumeration, which can be used to add Mac/iOS support to your Vulkan applications
  • 23 extensions which were promoted to core 1.1
  • 24 extensions which were promoted to core 1.2

It's also easy to add support for new extensions! Feel free to contribute your favorite Vulkan extension!

Directories

Path Synopsis
mocks
Package mock_debugutils is a generated GoMock package.
Package mock_debugutils is a generated GoMock package.
mocks
Package mock_host_query_reset is a generated GoMock package.
Package mock_host_query_reset is a generated GoMock package.
mocks
Package mock_bind_memory2 is a generated GoMock package.
Package mock_bind_memory2 is a generated GoMock package.
mocks
Package mock_buffer_device_address is a generated GoMock package.
Package mock_buffer_device_address is a generated GoMock package.
mocks
Package mock_create_renderpass2 is a generated GoMock package.
Package mock_create_renderpass2 is a generated GoMock package.
mocks
Package mock_descriptor_update_template is a generated GoMock package.
Package mock_descriptor_update_template is a generated GoMock package.
mocks
Package mock_device_group is a generated GoMock package.
Package mock_device_group is a generated GoMock package.
mocks
Package mock_device_group_creation is a generated GoMock package.
Package mock_device_group_creation is a generated GoMock package.
mocks
Package mock_draw_indirect_count is a generated GoMock package.
Package mock_draw_indirect_count is a generated GoMock package.
mocks
Package mock_external_fence_capabilities is a generated GoMock package.
Package mock_external_fence_capabilities is a generated GoMock package.
mocks
Package mock_external_memory_capabilities is a generated GoMock package.
Package mock_external_memory_capabilities is a generated GoMock package.
mocks
Package mock_external_semaphore_capabilities is a generated GoMock package.
Package mock_external_semaphore_capabilities is a generated GoMock package.
mocks
Package mock_get_memory_requirements2 is a generated GoMock package.
Package mock_get_memory_requirements2 is a generated GoMock package.
mocks
Package mock_get_physical_device_properties2 is a generated GoMock package.
Package mock_get_physical_device_properties2 is a generated GoMock package.
mocks
Package mock_maintenance1 is a generated GoMock package.
Package mock_maintenance1 is a generated GoMock package.
dummies
Package mock_maintenance3 is a generated GoMock package.
Package mock_maintenance3 is a generated GoMock package.
mocks
Package mock_maintenance3 is a generated GoMock package.
Package mock_maintenance3 is a generated GoMock package.
mocks
Package mock_sampler_ycbcr_conversion is a generated GoMock package.
Package mock_sampler_ycbcr_conversion is a generated GoMock package.
mocks
Package mock_surface is a generated GoMock package.
Package mock_surface is a generated GoMock package.
mocks
Package mock_swapchain is a generated GoMock package.
Package mock_swapchain is a generated GoMock package.
mocks
Package mock_timeline_semaphore is a generated GoMock package.
Package mock_timeline_semaphore is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL