render

package
v0.0.0-...-7483609 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package render camera.go Defines a camera type used to control the opengl viewport.

Package render mesh.go Defines a mesh type used to descripe an object for rendering.

Package render renderer.go Defines a renderer in the graphics package.

Package render traits.go Defines traits that can be used to render objects.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromColor

func FromColor(c uint32) (uint32, uint32, uint32, uint32)

FromColor used to decompress a color up to 4 uint32.

func ToColor

func ToColor(r, g, b, a uint32) uint32

ToColor used to compress a color down to a uint32.

Types

type Camera

type Camera struct {
	X, Y, Width, Height float32
}

Camera type used to hold the position of the camera.

func (*Camera) Activate

func (c *Camera) Activate()

Activate activates the camera on the current shader.

type Renderer

type Renderer interface {
	Begin()
	DrawRectangle(x, y, w, h float32, color uint32)
	Submit(ra munfall.Renderable)
	Flush()
	End()
}

Renderer interface used to talk to renderers.

func CreateRenderer2D

func CreateRenderer2D(vertexBufferSize, indexBufferSize int) Renderer

CreateRenderer2D used to create a renderer2d object correctly.

type RendersTraits

type RendersTraits interface {
	Render()
}

RendersTraits defines a collection of objects that can be used in conjunction with a world object to render traits.

func CreateRendersTraits2D

func CreateRendersTraits2D(w munfall.World) RendersTraits

CreateRendersTraits2D creates a 2D implementation of RendersTraits.

Jump to

Keyboard shortcuts

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