hud

package
v0.0.0-...-b8cd253 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WireFrameData

func WireFrameData(vertices []float32, show block.Side) []float32

Types

type FPS

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

func (*FPS) Fps

func (f *FPS) Fps() int

func (*FPS) Update

func (f *FPS) Update()

type LineRenderer

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

LineRenderer is in charge of rendering Lines as HUD on screen

func NewLineRenderer

func NewLineRenderer(ctx *ctx.Context) (*LineRenderer, error)

NewLineRenderer creates a new instance of LineRenderer

func (*LineRenderer) Render

func (r *LineRenderer) Render()

Render lines (crosshairs and wireframe) to screen

type Lines

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

Lines holds vao, vbo, shader and vertex data for HUD line models

func NewLines

func NewLines(shader *glhf.Shader, data []float32) *Lines

NewLines creates a new instance of *Lines to be rendered as HUD on screen

func (*Lines) Release

func (l *Lines) Release()

Release will release the *Lines data from VRAM

func (*Lines) Render

func (l *Lines) Render(mat mgl32.Mat4)

Render will render HUD lines to screen

Jump to

Keyboard shortcuts

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