cube

package
v0.0.0-...-428aa4c Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CubeModule

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

func NewCubeModule

func NewCubeModule(app *app.AppBase, ui *gui.ImGUIModule) (*CubeModule, error)

func (*CubeModule) CreateCommandBuffers

func (c *CubeModule) CreateCommandBuffers(renderPass vk.RenderPass, framebuffer vk.Framebuffer, app *app.AppBase) ([]vk.CommandBuffer, error)

func (*CubeModule) Destroy

func (c *CubeModule) Destroy()

func (*CubeModule) DrawUI

func (c *CubeModule) DrawUI()

func (*CubeModule) NewFrame

func (c *CubeModule) NewFrame(base *app.AppBase)

func (*CubeModule) PostFrame

func (c *CubeModule) PostFrame()

type IndexData

type IndexData []uint16

func (IndexData) Bytes

func (i IndexData) Bytes() []byte

func (IndexData) IndexType

func (i IndexData) IndexType() vk.IndexType

type Mesh

type Mesh struct {
	UBO        *UBO
	VertexData VertexData
	IndexData  IndexData

	VertexResource *vkg.BufferResource
	IndexResource  *vkg.BufferResource
	UBOResource    *vkg.BufferResource
	// contains filtered or unexported fields
}

func (*Mesh) Destroy

func (m *Mesh) Destroy()

func (*Mesh) UpdateUBO

func (mesh *Mesh) UpdateUBO(app *app.AppBase)

type UBO

type UBO struct {
	Model lin.Mat4x4
	View  lin.Mat4x4
	Proj  lin.Mat4x4
}

func (*UBO) Bytes

func (u *UBO) Bytes() []byte

func (*UBO) Descriptor

func (u *UBO) Descriptor() *vkg.Descriptor

type Vertex

type Vertex struct {
	Pos   lin.Vec3
	Color lin.Vec3
}

type VertexData

type VertexData []Vertex

func (VertexData) Bytes

func (v VertexData) Bytes() []byte

func (VertexData) GetAttributeDescriptions

func (v VertexData) GetAttributeDescriptions() []vk.VertexInputAttributeDescription

func (VertexData) GetBindingDescription

func (v VertexData) GetBindingDescription() vk.VertexInputBindingDescription

Jump to

Keyboard shortcuts

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