Documentation ¶
Index ¶
- type Loader
- type VulkanLoader
- func (l *VulkanLoader) APIVersion() common.APIVersion
- func (l *VulkanLoader) AvailableExtensions() (map[string]*core1_0.ExtensionProperties, common.VkResult, error)
- func (l *VulkanLoader) AvailableExtensionsForLayer(layerName string) (map[string]*core1_0.ExtensionProperties, common.VkResult, error)
- func (l *VulkanLoader) AvailableLayers() (map[string]*core1_0.LayerProperties, common.VkResult, error)
- func (l *VulkanLoader) CreateInstance(allocationCallbacks *driver.AllocationCallbacks, ...) (core1_0.Instance, common.VkResult, error)
- func (l *VulkanLoader) Driver() driver.Driver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Loader ¶
type Loader interface { // Driver is the Vulkan wrapper driver used by this Loader Driver() driver.Driver // APIVersion is the maximum Vulkan API version supported by this Loader. APIVersion() common.APIVersion // AvailableExtensions returns all of the instance extensions available on this Loader, // in the form of a map of extension name to ExtensionProperties // // https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkEnumerateInstanceExtensionProperties.html AvailableExtensions() (map[string]*core1_0.ExtensionProperties, common.VkResult, error) // AvailableExtensionsForLayer returns all of the layer extensions available on this Loader // for the requested layer, in the form of a map of extension name to ExtensionProperties // // layerName - a string naming the layer to retrieve extensions from // // https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkEnumerateInstanceExtensionProperties.html AvailableExtensionsForLayer(layerName string) (map[string]*core1_0.ExtensionProperties, common.VkResult, error) // AvailableLayers returns all of the layers available on this Loader, in the form of a // map of layer name to LayerProperties // // https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkEnumerateInstanceLayerProperties.html AvailableLayers() (map[string]*core1_0.LayerProperties, common.VkResult, error) // CreateInstance creates a new Vulkan Instance // // allocationCallbacks - controls host memory allocation // // options - Controls creation of the Instance // // https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateInstance.html CreateInstance(allocationCallbacks *driver.AllocationCallbacks, options core1_0.InstanceCreateInfo) (core1_0.Instance, common.VkResult, error) }
Loader is the root object of vkng - all usage begins by creating a Loader and then using the Loader to create a Vulkan instance with Loader.CreateInstance
type VulkanLoader ¶
type VulkanLoader struct {
// contains filtered or unexported fields
}
func CreateLoaderFromDriver ¶
func CreateLoaderFromDriver(driver driver.Driver) (*VulkanLoader, error)
CreateLoaderFromDriver generates a Loader from a driver.Driver object- this is usually used in tests to build a Loader from mock drivers
func CreateLoaderFromProcAddr ¶
func CreateLoaderFromProcAddr(addr unsafe.Pointer) (*VulkanLoader, error)
CreateLoaderFromProcAddr generates a Loader from a ProcAddr provided by another library, such as the address provided by sdl2's SDL_Vulkan_GetVkInstanceProcAddr
func CreateSystemLoader ¶ added in v0.2.0
func CreateSystemLoader() (*VulkanLoader, error)
CreateSystemLoader generates a Loader from a vulkan-1.dll/so located on the local file system
func NewLoader ¶
func NewLoader( driver driver.Driver, ) *VulkanLoader
func (*VulkanLoader) APIVersion ¶
func (l *VulkanLoader) APIVersion() common.APIVersion
func (*VulkanLoader) AvailableExtensions ¶
func (l *VulkanLoader) AvailableExtensions() (map[string]*core1_0.ExtensionProperties, common.VkResult, error)
func (*VulkanLoader) AvailableExtensionsForLayer ¶
func (l *VulkanLoader) AvailableExtensionsForLayer(layerName string) (map[string]*core1_0.ExtensionProperties, common.VkResult, error)
func (*VulkanLoader) AvailableLayers ¶
func (l *VulkanLoader) AvailableLayers() (map[string]*core1_0.LayerProperties, common.VkResult, error)
func (*VulkanLoader) CreateInstance ¶
func (l *VulkanLoader) CreateInstance(allocationCallbacks *driver.AllocationCallbacks, options core1_0.InstanceCreateInfo) (core1_0.Instance, common.VkResult, error)
func (*VulkanLoader) Driver ¶
func (l *VulkanLoader) Driver() driver.Driver
Click to show internal directories.
Click to hide internal directories.