renderer

package
v0.0.0-...-392c9ed Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2019 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Capabilities

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

func NewCapabilities

func NewCapabilities(glContext js.Value, extensions *Extensions, settings *Settings) *Capabilities

func (*Capabilities) GetMaxAnisotropy

func (cap *Capabilities) GetMaxAnisotropy() float64

func (*Capabilities) GetMaxPrecision

func (cap *Capabilities) GetMaxPrecision(precision constant.Precision) constant.Precision

func (*Capabilities) GetWebGLVersion

func (cap *Capabilities) GetWebGLVersion() int

type Extensions

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

func NewExtensions

func NewExtensions(glContext js.Value) *Extensions

func (*Extensions) Get

func (ext *Extensions) Get(name string) js.Value

type GLTypes

type GLTypes struct {
	StaticDraw         js.Value
	ArrayBuffer        js.Value
	ElementArrayBuffer js.Value
	VertexShader       js.Value
	FragmentShader     js.Value
	Float              js.Value
	DepthTest          js.Value
	ColorBufferBit     js.Value
	Triangles          js.Value
	UnsignedShort      js.Value
}

func (*GLTypes) New

func (types *GLTypes) New(glContext js.Value)

type Lights

type Lights struct {
}

func (*Lights) Setup

func (li *Lights) Setup(lights []*core.Light, shadows []*core.Light, camera *core.Camera)

type Renderer

type Renderer struct {
	DomElement js.Value

	AutoClear        bool
	AutoClearColor   bool
	AutoClearDepth   bool
	AutoClearStencil bool

	SortObjects bool

	//ClippingPlanes       []
	LocalClippingEnabled bool

	GammaFactor float32
	GammaInput  bool
	GammaOutput bool

	PhysicallyCorrectLights bool
	ToneMapping             constant.ToneMapping
	ToneMappingExposure     float32
	ToneMappingWhitePoint   float32

	MaxMorphTargets int
	MaxMorphNormals int
	// contains filtered or unexported fields
}

func NewRenderer

func NewRenderer(settings *webgl.Settings) (*Renderer, error)

func (*Renderer) Close

func (renderer *Renderer) Close()

func (*Renderer) GetTargetPixelRatio

func (renderer *Renderer) GetTargetPixelRatio() float32

func (*Renderer) Render

func (renderer *Renderer) Render(scene *core.Scene, camera *core.Camera, target *render.Target, forceClear bool) error

type Settings

type Settings struct {
	Alpha                  bool
	Depth                  bool
	Stencil                bool
	Antialias              bool
	PremultipliedAlpha     bool
	PreserveDrawingBuffer  bool
	PowerPreference        string
	Precision              constant.Precision
	LogarithmicDepthBuffer bool
}

func DefaultSettings

func DefaultSettings() *Settings

type State

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

func NewState

func NewState() *State

func (*State) AddLight

func (state *State) AddLight(light *core.Light)

func (*State) AddShadow

func (state *State) AddShadow(shadow *core.Light)

func (*State) Restart

func (state *State) Restart()

func (*State) SetupLights

func (state *State) SetupLights(camera *core.Camera)

type States

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

func GetStatesInstance

func GetStatesInstance() *States

func (*States) Close

func (states *States) Close()

func (*States) Get

func (states *States) Get(scene *core.Scene, camera *core.Camera) *State

Jump to

Keyboard shortcuts

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