meshes

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: MIT Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DefaultMeshLoadFlags are the flags always applied when loading a new mesh regardless
	// of what post process flags are used when loading a mesh.
	//
	// Defaults to: asig.PostProcessTriangulate | asig.PostProcessCalcTangentSpace;
	// Note: changing this will break the normal lit shaders, which expect tangents to be there
	DefaultMeshLoadFlags asig.PostProcess = asig.PostProcessTriangulate | asig.PostProcessCalcTangentSpace
)

Functions

This section is empty.

Types

type Mesh

type Mesh struct {
	Name string
	/*
		Vao has the following shader attribute layout:
			- Loc0: Pos
			- Loc1: Normal
			- Loc2: UV0
			- Loc3: Tangent
			- (Optional) Color

		Optional stuff appear in the order in this list, depending on what other optional stuff exists.

		For example:
			- If color exists it will be in Loc3, otherwise it is unset
	*/
	Vao       buffers.VertexArray
	SubMeshes []SubMesh
}

func NewMesh

func NewMesh(name, modelPath string, postProcessFlags asig.PostProcess) (Mesh, error)

type SubMesh added in v0.14.0

type SubMesh struct {
	BaseVertex int32
	BaseIndex  uint32
	IndexCount int32
}

Jump to

Keyboard shortcuts

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