vkctx

package
v0.0.0-...-6e38400 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	EnableApiLayers, EnableInstanceExtensions, EnableDeviceExtensions []string

	Instance vk.Instance
	Surface  vk.SurfaceKHR

	PhysicalDevice vk.PhysicalDevice
	Device         vk.Device

	GraphicsQueueFamilyIndex, PresentQueueFamilyIndex uint32
	GraphicsQueue, PresentQueue                       vk.Queue

	// Command pool and buffers
	CommandPool    vk.CommandPool
	CommandBuffers []vk.CommandBuffer // Primary buffers

	// Swapchain handles
	Swapchain             vk.SwapchainKHR
	SwapchainExtent       vk.Extent2D
	SwapchainImageFormat  vk.Format
	SwapchainImages       []vk.Image
	SwapchainImageViews   []vk.ImageView
	SwapChainFramebuffers []vk.Framebuffer

	// Sync objects
	ImageAvailableSemaphore, RenderFinishedSemaphore vk.Semaphore
	InFlightFence                                    vk.Fence
}

func (*Context) BeginOneTimeCommands

func (app *Context) BeginOneTimeCommands() vk.CommandBuffer

func (*Context) CreateImage

func (ctx *Context) CreateImage(extent vk.Extent2D, format vk.Format, tiling vk.ImageTiling, usage vk.ImageUsageFlags, memProps vk.MemoryPropertyFlags) (image vk.Image, imageMemory vk.DeviceMemory)

func (*Context) CreateImageView

func (ctx *Context) CreateImageView(image vk.Image, format vk.Format, aspectMask vk.ImageAspectFlags) vk.ImageView

func (*Context) EndOneTimeCommands

func (app *Context) EndOneTimeCommands(buf vk.CommandBuffer)

func (*Context) FindMemoryType

func (ctx *Context) FindMemoryType(typeFilter uint32, flags vk.MemoryPropertyFlags) uint32

func (*Context) Initialize

func (ctx *Context) Initialize(hInstance windows.Handle, hWnd windows.HWND)

func (*Context) Teardown

func (ctx *Context) Teardown()

Jump to

Keyboard shortcuts

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