image

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: 11 Imported by: 0

Documentation

Index

Constants

Variables

This section is empty.

Functions

func MipLevels

func MipLevels(width, height int) int

Types

type Args

type Args struct {
	Type    core1_0.ImageType
	Key     string
	Width   int
	Height  int
	Depth   int
	Layers  int
	Levels  int
	Format  core1_0.Format
	Usage   core1_0.ImageUsageFlags
	Tiling  core1_0.ImageTiling
	Sharing core1_0.SharingMode
	Layout  core1_0.ImageLayout
	Memory  core1_0.MemoryPropertyFlags
}

type Array

type Array []*Image

type Data

type Data struct {
	Width  int
	Height int
	Format core1_0.Format
	Buffer []byte
}

func LoadFile

func LoadFile(assets fs.Filesystem, file string) (*Data, error)

type Image

type Image struct {
	Args
	// contains filtered or unexported fields
}

func New

func New(dev *device.Device, args Args) (*Image, error)

func New2D

func New2D(device *device.Device, key string, width, height int, format core1_0.Format, mipmaps bool, usage core1_0.ImageUsageFlags) (*Image, error)

func Wrap

func Wrap(dev *device.Device, ptr core1_0.Image, args Args) *Image

func (*Image) Destroy

func (i *Image) Destroy()

func (*Image) Format

func (i *Image) Format() core1_0.Format

func (*Image) Height

func (i *Image) Height() int

func (*Image) Key

func (i *Image) Key() string

func (*Image) Memory

func (i *Image) Memory() *device.Memory

func (*Image) MipLevels

func (i *Image) MipLevels() int

func (*Image) Ptr

func (i *Image) Ptr() core1_0.Image

func (*Image) Size

func (i *Image) Size() vec3.T

func (*Image) View

func (i *Image) View(format core1_0.Format, mask core1_0.ImageAspectFlags) (*View, error)

func (*Image) Width

func (i *Image) Width() int

type View

type View struct {
	// contains filtered or unexported fields
}

func (*View) Destroy

func (v *View) Destroy()

func (*View) Format

func (v *View) Format() core1_0.Format

func (*View) Image

func (v *View) Image() *Image

func (*View) Ptr

func (v *View) Ptr() core1_0.ImageView

type ViewArray

type ViewArray []*View

Jump to

Keyboard shortcuts

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