opengl

package
v0.0.0-...-3eebe10 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RenderCommands

type RenderCommands struct {
	Sprites []SpriteRenderCommand
}

type RenderSystem

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

RenderSystem defines an OpenGL-based rendering system.

func NewOpenGLRenderSystem

func NewOpenGLRenderSystem(cam *camera.Camera, commands *RenderCommands) *RenderSystem

func (*RenderSystem) EnsureSpritesBufLen

func (s *RenderSystem) EnsureSpritesBufLen(minLen int)

func (*RenderSystem) Remove

func (s *RenderSystem) Remove(e ecs.BasicEntity)

func (*RenderSystem) Update

func (s *RenderSystem) Update(dt float32)

type SpriteRenderCommand

type SpriteRenderCommand struct {
	Scale           [2]float32
	Size            mgl32.Vec2
	Position        mgl32.Vec3
	Offset          mgl32.Vec2
	RotationRadians float32
	Texture         *graphic.Texture
	FlipVertically  bool
}

Jump to

Keyboard shortcuts

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