texture

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

Documentation

Index

Constants

View Source
const Diffuse = Slot("diffuse")
View Source
const FilterLinear = Filter(core1_0.FilterLinear)
View Source
const FilterNearest = Filter(core1_0.FilterNearest)
View Source
const Normal = Slot("normal")

Variables

View Source
var Checker = PathRef("textures/uv_checker.png")

Functions

func PathArgsRef

func PathArgsRef(path string, args Args) *pathRef

func PathRef

func PathRef(path string) *pathRef

Types

type Args

type Args struct {
	Filter  Filter
	Wrap    Wrap
	Aspect  core1_0.ImageAspectFlags
	Usage   core1_0.ImageUsageFlags
	Border  core1_0.BorderColor
	Mipmaps bool
}

type Array

type Array []*Texture

type Data

type Data struct {
	Args
	Image *image.Data
}

type Filter

type Filter core1_0.Filter

type Slot

type Slot string

type Texture

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

func FromImage

func FromImage(device *device.Device, key string, img *image.Image, args Args) (*Texture, error)

func FromView

func FromView(device *device.Device, key string, view *image.View, args Args) (*Texture, error)

func New

func New(device *device.Device, key string, width, height int, format core1_0.Format, args Args) (*Texture, error)

func (*Texture) Destroy

func (t *Texture) Destroy()

func (*Texture) Image

func (t *Texture) Image() *image.Image

func (*Texture) Key

func (t *Texture) Key() string

func (*Texture) Ptr

func (t *Texture) Ptr() core1_0.Sampler

func (*Texture) Size

func (t *Texture) Size() vec3.T

func (*Texture) View

func (t *Texture) View() *image.View

Jump to

Keyboard shortcuts

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