render

package
v0.0.0-...-ddc071b Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2023 License: GPL-3.0 Imports: 13 Imported by: 0

README

dieselfluid

pkg render

This Repository is still in development

DieselFluid Go Logo

Documentation

Index

Constants

View Source
const (
	MIN_PARAM_SIZE  = 10
	BYTES_PER_FLOAT = 4
	COORD_4         = 4
	COORD_3         = 3
	COORD_2         = 2
	INITIALIZED     = 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type RenderSystem

type RenderSystem struct {
	MyRenderer         *glr.GLRenderer
	MeshEntities       []*defs.MeshEntity
	Shaders            defs.ShadersMap
	Graph              *scene.Scene
	Textures           defs.TexturesMap
	Materials          map[string]*defs.Material
	MaterialIndexNames []*string
	CubeMap            uint32
	Light              defs.Light
	Time               time.Time
	Angle              float32
	// contains filtered or unexported fields
}

RenderSystem provides ECS Render Mechanism

func Init

func Init(scn string) (RenderSystem, error)

Gather() - Package customized initialization routine function. Gather is an initialization like function moniker used package by package to initialize a main package construct for API usage. Here Gather returns the main package type which is the RenderSystem and initializes with a GLTF scene file name located in the "dslfluid.com/resources/" directory

func (*RenderSystem) Add

Add() - Adds MeshEntity to RenderSystem

func (r *RenderSystem) CompileLink() error

func (*RenderSystem) GetParticleBufferId

func (r *RenderSystem) GetParticleBufferId() uint32

Get opengl buffer location id

func (*RenderSystem) Init

func (r *RenderSystem) Init(width int, height int, name string, particle_system bool) error

func (*RenderSystem) Meshes

func (r *RenderSystem) Meshes() error

Meshes() error - Processes current MeshEntity list and configures mesh VAO pointer state for OpenGL usage. Also performs Mesh Preprocessing if neccessary

func (*RenderSystem) RegisterMesh

func (r *RenderSystem) RegisterMesh(meshIndex int, primitiveIndex int, scn *scene.Scene) (*defs.MeshComponent, error)

RegisterMesh - Parses GLTF scene file and fills MeshComponent entity with appropriate GPU intialization parameters in memory

func (*RenderSystem) RegisterParticleSystem

func (r *RenderSystem) RegisterParticleSystem(positions []float32, layout_location int) (uint32, error)

Registers unique particle system (positions only)

func (*RenderSystem) Remove

func (r *RenderSystem) Remove(basic ecs.BasicEntity)

func (*RenderSystem) Run

func (r *RenderSystem) Run(message chan string) error

Run() RenderSystem Runtime

func (*RenderSystem) Update

func (r *RenderSystem) Update(elapsed float64)

Update() - Scene time step update with frame render rendering components associated

func (*RenderSystem) UpdateParticleSystem

func (r *RenderSystem) UpdateParticleSystem(positions []float32)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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