mtGeometry

package module
v0.0.0-...-4ee445c Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2019 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArrayGeometry

type ArrayGeometry struct {
	ArrayBuffer  uint32
	VertexBuffer uint32
	VertexCount  int32
}

func GenerateGeometryArrayAttributes

func GenerateGeometryArrayAttributes(mesh *[]Mesh, vertexCount int) ArrayGeometry

type Geometry

type Geometry struct {
	// Important geometry attributes
	ArrayBuffer  uint32
	VertexBuffer uint32
	IndexBuffer  uint32
	IndexCount   int32
}

func CreateFullscreenQuadGeometry

func CreateFullscreenQuadGeometry() Geometry

func CreateUnitSphereGeometry

func CreateUnitSphereGeometry(subdivLat, subdivLong int) Geometry

func CreateUnitSquareGeometry

func CreateUnitSquareGeometry(subdivisions int, offset mgl32.Vec3) Geometry

func GenerateGeometryAttributes

func GenerateGeometryAttributes(mesh *[]Mesh, meshIndices *[]uint32, vertexCount, indexCount int) Geometry

type Mesh

type Mesh struct {
	Pos    mgl32.Vec3
	Normal mgl32.Vec3
	UV     mgl32.Vec2
}

type Object

type Object struct {
	Geo     Geometry
	Pos     mgl32.Vec3
	Scale   mgl32.Vec3
	Color   mgl32.Vec3
	IsLight bool
}

func CreateObject

func CreateObject(geo Geometry, pos, scale, color mgl32.Vec3, isLight bool) Object

Jump to

Keyboard shortcuts

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