vulkan

package
v0.0.0-...-124f97e Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: GPL-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultDescriptorPools = []core1_0.DescriptorPoolSize{
	{
		Type:            core1_0.DescriptorTypeUniformBuffer,
		DescriptorCount: 10000,
	},
	{
		Type:            core1_0.DescriptorTypeStorageBuffer,
		DescriptorCount: 10000,
	},
	{
		Type:            core1_0.DescriptorTypeCombinedImageSampler,
		DescriptorCount: 100000,
	},
	{
		Type:            core1_0.DescriptorTypeInputAttachment,
		DescriptorCount: 1000,
	},
}

Functions

func GetCurrentMonitor

func GetCurrentMonitor(window *glfw.Window) *glfw.Monitor

Types

type App

type App interface {
	Instance() instance.T
	Device() device.T
	Destroy()

	Worker(int) command.Worker
	Transferer() command.Worker
	Flush()

	Pool() descriptor.Pool
	Meshes() cache.MeshCache
	Textures() cache.TextureCache
	Shaders() cache.ShaderCache
}

func New

func New(appName string, deviceIndex int) App

type ResizeHandler

type ResizeHandler func(width, height int)

type Target

type Target interface {
	Size() TargetSize
	Scale() float32
	Width() int
	Height() int
	Frames() int

	Surfaces() []image.T
	SurfaceFormat() core1_0.Format
	Aquire() (*swapchain.Context, error)
	Present(command.Worker, *swapchain.Context)

	Destroy()
}

func NewColorTarget

func NewColorTarget(device device.T, key string, format core1_0.Format, size TargetSize) Target

func NewDepthTarget

func NewDepthTarget(device device.T, key string, size TargetSize) Target

func NewRenderTarget

func NewRenderTarget(device device.T, key string, format core1_0.Format, usage core1_0.ImageUsageFlags, size TargetSize) (Target, error)

type TargetSize

type TargetSize struct {
	Width  int
	Height int
	Frames int
	Scale  float32
}

type Window

type Window interface {
	Target

	Title() string
	SetTitle(string)

	Poll()
	ShouldClose() bool
	Destroy()

	SetInputHandler(input.Handler)

	Swapchain() swapchain.T
}

func NewWindow

func NewWindow(backend App, args WindowArgs) (Window, error)

type WindowArgs

type WindowArgs struct {
	Title         string
	Width         int
	Height        int
	Frames        int
	Vsync         bool
	Debug         bool
	InputHandler  input.Handler
	ResizeHandler ResizeHandler
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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