graphics

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Camera

type Camera struct {
	internal.Node
	// contains filtered or unexported fields
}

func (*Camera) AspectRatio

func (c *Camera) AspectRatio() float32

func (*Camera) AutoExposure

func (c *Camera) AutoExposure() bool

func (*Camera) AutoFocus

func (c *Camera) AutoFocus() bool

func (*Camera) Delete

func (c *Camera) Delete()

func (*Camera) Exposure

func (c *Camera) Exposure() float32

func (*Camera) FoV

func (c *Camera) FoV() sprec.Angle

func (*Camera) FoVMode

func (c *Camera) FoVMode() graphics.FoVMode

func (*Camera) FocusRange

func (c *Camera) FocusRange() (float32, float32)

func (*Camera) MaximumExposure added in v0.3.0

func (c *Camera) MaximumExposure() float32

func (*Camera) MinimumExposure added in v0.3.0

func (c *Camera) MinimumExposure() float32

func (*Camera) SetAspectRatio

func (c *Camera) SetAspectRatio(ratio float32)

func (*Camera) SetAutoExposure

func (c *Camera) SetAutoExposure(enabled bool)

func (*Camera) SetAutoFocus

func (c *Camera) SetAutoFocus(enabled bool)

func (*Camera) SetExposure

func (c *Camera) SetExposure(exposure float32)

func (*Camera) SetFoV

func (c *Camera) SetFoV(angle sprec.Angle)

func (*Camera) SetFoVMode

func (c *Camera) SetFoVMode(mode graphics.FoVMode)

func (*Camera) SetFocusRange

func (c *Camera) SetFocusRange(near, far float32)

func (*Camera) SetMaximumExposure added in v0.3.0

func (c *Camera) SetMaximumExposure(maxExposure float32)

func (*Camera) SetMinimumExposure added in v0.3.0

func (c *Camera) SetMinimumExposure(minExposure float32)

type CubeTexture

type CubeTexture struct {
	*opengl.CubeTexture
}

func (*CubeTexture) Delete

func (t *CubeTexture) Delete()

type Engine

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

func NewEngine

func NewEngine() *Engine

func (*Engine) Create

func (e *Engine) Create()

func (*Engine) CreateCubeTexture

func (e *Engine) CreateCubeTexture(definition graphics.CubeTextureDefinition) graphics.CubeTexture

func (*Engine) CreateMeshTemplate

func (e *Engine) CreateMeshTemplate(definition graphics.MeshTemplateDefinition) graphics.MeshTemplate

func (*Engine) CreatePBRMaterial

func (e *Engine) CreatePBRMaterial(definition graphics.PBRMaterialDefinition) graphics.Material

func (*Engine) CreateScene

func (e *Engine) CreateScene() graphics.Scene

func (*Engine) CreateTwoDTexture

func (e *Engine) CreateTwoDTexture(definition graphics.TwoDTextureDefinition) graphics.TwoDTexture

func (*Engine) Destroy

func (e *Engine) Destroy()

type Light

type Light struct {
	internal.Node
	// contains filtered or unexported fields
}

func (*Light) Delete

func (l *Light) Delete()

func (*Light) Intensity

func (l *Light) Intensity() sprec.Vec3

func (*Light) ReflectionTexture

func (l *Light) ReflectionTexture() graphics.CubeTexture

func (*Light) RefractionTexture

func (l *Light) RefractionTexture() graphics.CubeTexture

func (*Light) SetIntensity

func (l *Light) SetIntensity(intensity sprec.Vec3)

func (*Light) SetReflectionTexture

func (l *Light) SetReflectionTexture(texture graphics.CubeTexture)

func (*Light) SetRefractionTexture

func (l *Light) SetRefractionTexture(texture graphics.CubeTexture)

type LightMode

type LightMode int
const (
	LightModeDirectional LightMode = 1 + iota
	LightModeAmbient
)

type Material

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

func (*Material) Delete

func (m *Material) Delete()

type Mesh

type Mesh struct {
	internal.Node
	// contains filtered or unexported fields
}

func (*Mesh) Delete

func (m *Mesh) Delete()

type MeshTemplate

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

func (*MeshTemplate) Delete

func (t *MeshTemplate) Delete()

type QuadMesh

type QuadMesh struct {
	VertexBuffer     *opengl.Buffer
	IndexBuffer      *opengl.Buffer
	VertexArray      *opengl.VertexArray
	Primitive        uint32
	IndexCount       int32
	IndexOffsetBytes int
}

func (*QuadMesh) Allocate

func (m *QuadMesh) Allocate()

func (*QuadMesh) Release

func (m *QuadMesh) Release()

type Renderer

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

func (*Renderer) Allocate

func (r *Renderer) Allocate()

func (*Renderer) Release

func (r *Renderer) Release()

func (*Renderer) Render

func (r *Renderer) Render(viewport graphics.Viewport, scene *Scene, camera *Camera)

type Scene

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

func (*Scene) CreateAmbientLight

func (s *Scene) CreateAmbientLight() graphics.AmbientLight

func (*Scene) CreateCamera

func (s *Scene) CreateCamera() graphics.Camera

func (*Scene) CreateDirectionalLight

func (s *Scene) CreateDirectionalLight() graphics.DirectionalLight

func (*Scene) CreateMesh

func (s *Scene) CreateMesh(template graphics.MeshTemplate) graphics.Mesh

func (*Scene) Delete

func (s *Scene) Delete()

func (*Scene) Render

func (s *Scene) Render(viewport graphics.Viewport, camera graphics.Camera)

func (*Scene) Sky

func (s *Scene) Sky() graphics.Sky

type Sky

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

func (*Sky) BackgroundColor

func (s *Sky) BackgroundColor() sprec.Vec3

func (*Sky) SetBackgroundColor

func (s *Sky) SetBackgroundColor(color sprec.Vec3)

func (*Sky) SetSkybox

func (s *Sky) SetSkybox(skybox graphics.CubeTexture)

func (*Sky) Skybox

func (s *Sky) Skybox() graphics.CubeTexture

type SkyboxMesh

type SkyboxMesh struct {
	VertexBuffer     *opengl.Buffer
	IndexBuffer      *opengl.Buffer
	VertexArray      *opengl.VertexArray
	Primitive        uint32
	IndexCount       int32
	IndexOffsetBytes int
}

func (*SkyboxMesh) Allocate

func (m *SkyboxMesh) Allocate()

func (*SkyboxMesh) Release

func (m *SkyboxMesh) Release()

type SubMeshTemplate

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

type TwoDTexture

type TwoDTexture struct {
	*opengl.TwoDTexture
}

func (*TwoDTexture) Delete

func (t *TwoDTexture) Delete()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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