render

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2020 License: MIT Imports: 7 Imported by: 5 modules, 9 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AmbientLight

type AmbientLight struct {
	Color             sprec.Vec3
	IrradianceTexture *graphics.CubeTexture
}

type Camera

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

func NewCamera

func NewCamera() *Camera

func (*Camera) Matrix

func (c *Camera) Matrix() sprec.Mat4

func (*Camera) ProjectionMatrix

func (c *Camera) ProjectionMatrix() sprec.Mat4

func (*Camera) SetMatrix

func (c *Camera) SetMatrix(matrix sprec.Mat4)

func (*Camera) SetProjectionMatrix

func (c *Camera) SetProjectionMatrix(matrix sprec.Mat4)

func (*Camera) ViewMatrix

func (c *Camera) ViewMatrix() sprec.Mat4

type DirectionalLight

type DirectionalLight struct {
	Color     sprec.Vec3
	Direction sprec.Vec3
}

type Layout

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

func NewLayout

func NewLayout(size float32, depth int) *Layout

func (*Layout) CreateRenderable

func (l *Layout) CreateRenderable(matrix sprec.Mat4, radius float32, model *resource.Model) *Renderable

func (*Layout) DeleteRenderable

func (l *Layout) DeleteRenderable(renderable *Renderable)

func (*Layout) InvalidateRenderable

func (l *Layout) InvalidateRenderable(renderable *Renderable)

func (*Layout) SetSkybox

func (l *Layout) SetSkybox(skybox *Skybox)

func (*Layout) Skybox

func (l *Layout) Skybox() *Skybox

type Node

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

func (*Node) FindNode

func (n *Node) FindNode(position sprec.Vec3, size float32) (*Node, bool)

func (*Node) IsVisibleFrom

func (n *Node) IsVisibleFrom(camera *Camera) bool

type Renderable

type Renderable struct {
	Matrix sprec.Mat4
	Radius float32
	Model  *resource.Model
	// contains filtered or unexported fields
}

type Scene

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

func NewScene

func NewScene() *Scene

func (*Scene) Init

func (s *Scene) Init(gfxWorker *async.Worker) async.Outcome

func (*Scene) Layout

func (s *Scene) Layout() *Layout

func (*Scene) Release

func (s *Scene) Release(registry *resource.Registry, gfxWorker *async.Worker) async.Outcome

func (*Scene) Render

func (s *Scene) Render(ctx game.RenderContext)

func (*Scene) SetActiveCamera

func (s *Scene) SetActiveCamera(camera *Camera)

type Skybox

type Skybox struct {
	SkyboxTexture            *graphics.CubeTexture
	AmbientReflectionTexture *graphics.CubeTexture
	AmbientRefractionTexture *graphics.CubeTexture
}

Jump to

Keyboard shortcuts

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