opengl

package
v0.0.0-...-5b12917 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2017 License: GPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const MAX_DIRECTIONAL_LIGHTS = 4
View Source
const MAX_POINT_LIGHTS = 4

Variables

This section is empty.

Functions

This section is empty.

Types

type OpenglRenderer

type OpenglRenderer struct {
	WindowWidth, WindowHeight int
	FullScreen                bool
	WindowTitle               string
	Window                    *glfw.Window
	// contains filtered or unexported fields
}

OpenglRenderer - opengl implementation

func NewOpenglRenderer

func NewOpenglRenderer(WindowTitle string, WindowWidth, WindowHeight int, FullScreen bool) *OpenglRenderer

NewOpenglRenderer - create new renderer

func (*OpenglRenderer) AddLight

func (glRenderer *OpenglRenderer) AddLight(light *renderer.Light)

func (*OpenglRenderer) AntiAliasing

func (glRenderer *OpenglRenderer) AntiAliasing(samples int)

func (*OpenglRenderer) BackGroundColor

func (glRenderer *OpenglRenderer) BackGroundColor(r, g, b, a float32)

BackGroundColor - set background color for the scene

func (*OpenglRenderer) Camera

func (glRenderer *OpenglRenderer) Camera() *renderer.Camera

func (*OpenglRenderer) CreatePostEffect

func (glRenderer *OpenglRenderer) CreatePostEffect(shader *renderer.Shader)

func (*OpenglRenderer) DestroyCubeMap

func (glRenderer *OpenglRenderer) DestroyCubeMap(cubeMap *renderer.CubeMap)

func (*OpenglRenderer) DestroyGeometry

func (glRenderer *OpenglRenderer) DestroyGeometry(geometry *renderer.Geometry)

func (*OpenglRenderer) DestroyMaterial

func (glRenderer *OpenglRenderer) DestroyMaterial(material *renderer.Material)

func (*OpenglRenderer) DestroyPostEffects

func (glRenderer *OpenglRenderer) DestroyPostEffects(shader *renderer.Shader)

func (*OpenglRenderer) DrawGeometry

func (glRenderer *OpenglRenderer) DrawGeometry(geometry *renderer.Geometry, transform mgl32.Mat4)

func (*OpenglRenderer) LockCursor

func (glRenderer *OpenglRenderer) LockCursor(lock bool)

func (*OpenglRenderer) RemoveLight

func (glRenderer *OpenglRenderer) RemoveLight(light *renderer.Light)

func (*OpenglRenderer) SetCamera

func (glRenderer *OpenglRenderer) SetCamera(camera *renderer.Camera)

func (*OpenglRenderer) SetInit

func (glRenderer *OpenglRenderer) SetInit(callback func())

func (*OpenglRenderer) SetRender

func (glRenderer *OpenglRenderer) SetRender(callback func())

func (*OpenglRenderer) SetUpdate

func (glRenderer *OpenglRenderer) SetUpdate(callback func())

func (*OpenglRenderer) Start

func (glRenderer *OpenglRenderer) Start()

Start -

func (*OpenglRenderer) UseCubeMap

func (glRenderer *OpenglRenderer) UseCubeMap(cubeMap *renderer.CubeMap)

func (*OpenglRenderer) UseMaterial

func (glRenderer *OpenglRenderer) UseMaterial(material *renderer.Material)

func (*OpenglRenderer) UseRendererParams

func (glRenderer *OpenglRenderer) UseRendererParams(params renderer.RendererParams)

func (*OpenglRenderer) UseShader

func (glRenderer *OpenglRenderer) UseShader(shader *renderer.Shader)

func (*OpenglRenderer) WindowDimensions

func (glRenderer *OpenglRenderer) WindowDimensions() mgl32.Vec2

Jump to

Keyboard shortcuts

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