attachment

package
v0.0.0-...-8e5a076 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BlendAdditive = Blend{
	Enabled: true,
	Color: BlendOp{
		Operation: core1_0.BlendOpAdd,
		SrcFactor: core1_0.BlendFactorOne,
		DstFactor: core1_0.BlendFactorOne,
	},
	Alpha: BlendOp{
		Operation: core1_0.BlendOpAdd,
		SrcFactor: core1_0.BlendFactorOne,
		DstFactor: core1_0.BlendFactorZero,
	},
}
View Source
var BlendMix = Blend{
	Enabled: true,
	Color: BlendOp{
		Operation: core1_0.BlendOpAdd,
		SrcFactor: core1_0.BlendFactorSrcAlpha,
		DstFactor: core1_0.BlendFactorOneMinusSrcAlpha,
	},
	Alpha: BlendOp{
		Operation: core1_0.BlendOpAdd,
		SrcFactor: core1_0.BlendFactorOne,
		DstFactor: core1_0.BlendFactorZero,
	},
}
View Source
var BlendMultiply = Blend{
	Enabled: true,
	Color: BlendOp{
		Operation: core1_0.BlendOpAdd,
		SrcFactor: core1_0.BlendFactorSrcAlpha,
		DstFactor: core1_0.BlendFactorOneMinusSrcAlpha,
	},
	Alpha: BlendOp{
		Operation: core1_0.BlendOpAdd,
		SrcFactor: core1_0.BlendFactorSrcAlpha,
		DstFactor: core1_0.BlendFactorOneMinusSrcAlpha,
	},
}
View Source
var ErrArrayExhausted = errors.New("image array allocator exhausted")

Functions

This section is empty.

Types

type Blend

type Blend struct {
	Enabled bool
	Color   BlendOp
	Alpha   BlendOp
}

type BlendOp

type BlendOp struct {
	Operation core1_0.BlendOp
	SrcFactor core1_0.BlendFactor
	DstFactor core1_0.BlendFactor
}

type Color

type Color struct {
	Name          Name
	Samples       core1_0.SampleCountFlags
	LoadOp        core1_0.AttachmentLoadOp
	StoreOp       core1_0.AttachmentStoreOp
	InitialLayout core1_0.ImageLayout
	FinalLayout   core1_0.ImageLayout
	Clear         color.T
	Image         Image
	Blend         Blend
}

type Depth

type Depth struct {
	Samples        core1_0.SampleCountFlags
	LoadOp         core1_0.AttachmentLoadOp
	StoreOp        core1_0.AttachmentStoreOp
	StencilLoadOp  core1_0.AttachmentLoadOp
	StencilStoreOp core1_0.AttachmentStoreOp
	InitialLayout  core1_0.ImageLayout
	FinalLayout    core1_0.ImageLayout
	ClearDepth     float32
	ClearStencil   uint32

	// Allocation strategy. Defaults to allocating new images.
	Image Image
}

type Image

type Image interface {
	Format() core1_0.Format
	Next(device *device.Device, name string, width, height int) (*image.Image, bool, error)
}

func FromImage

func FromImage(img *image.Image) Image

FromImage returns an allocator that always returns a reference to the provided image.

func FromImageArray

func FromImageArray(images image.Array) Image

func NewImage

func NewImage(key string, format core1_0.Format, usage core1_0.ImageUsageFlags) Image

type Name

type Name string
const DepthName Name = "depth"

type T

type T interface {
	Name() Name
	Image() Image
	Clear() core1_0.ClearValue
	Description() core1_0.AttachmentDescription
	Blend() Blend
}

func NewColor

func NewColor(device *device.Device, desc Color) T

func NewDepth

func NewDepth(device *device.Device, desc Depth) T

Jump to

Keyboard shortcuts

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