models

package
v0.0.0-...-87cb436 Latest Latest
Warning

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

Go to latest
Published: May 25, 2021 License: MIT Imports: 14 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ImageToPixelData

func ImageToPixelData(file string) (*image.RGBA, error)

func NewTexture

func NewTexture(wrap_s, wrap_t, min_f, mag_f int32, file string) (uint32, error)

Types

type Mesh

type Mesh struct {
	Id       int
	Vertices []Vertex
	Indices  []uint32
	Textures []Texture
	// contains filtered or unexported fields
}

func NewMesh

func NewMesh(v []Vertex, i []uint32, t []Texture) Mesh

type Model

type Model struct {
	Meshes          []Mesh
	GammaCorrection bool
	BasePath        string
	FileName        string
	GobName         string
	// contains filtered or unexported fields
}

func NewModel

func NewModel(b, f string, g bool) (Model, error)

func (*Model) Dispose

func (m *Model) Dispose()

func (*Model) Draw

func (m *Model) Draw(shader uint32)

func (*Model) Export

func (m *Model) Export() error

func (*Model) Import

func (m *Model) Import() error

type Texture

type Texture struct {
	TextureType string
	Path        string
	// contains filtered or unexported fields
}

type Vertex

type Vertex struct {
	Position  mgl32.Vec3
	Normal    mgl32.Vec3
	TexCoords mgl32.Vec2
	Tangent   mgl32.Vec3
	Bitangent mgl32.Vec3
}

Jump to

Keyboard shortcuts

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