Documentation ¶
Index ¶
- Constants
- type RenderSystem
- func (r *RenderSystem) Add(e ecs.BasicEntity, mesh defs.MeshComponent, i int) []*defs.MeshEntity
- func (r *RenderSystem) CompileLink() error
- func (r *RenderSystem) GetParticleBufferId() uint32
- func (r *RenderSystem) Init(width int, height int, name string, particle_system bool) error
- func (r *RenderSystem) Meshes() error
- func (r *RenderSystem) RegisterMesh(meshIndex int, primitiveIndex int, scn *scene.Scene) (*defs.MeshComponent, error)
- func (r *RenderSystem) RegisterParticleSystem(positions []float32, layout_location int) (uint32, error)
- func (r *RenderSystem) Remove(basic ecs.BasicEntity)
- func (r *RenderSystem) Run(message chan string) error
- func (r *RenderSystem) Update(elapsed float64)
- func (r *RenderSystem) UpdateParticleSystem(positions []float32)
Constants ¶
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 ¶
func (r *RenderSystem) Add(e ecs.BasicEntity, mesh defs.MeshComponent, i int) []*defs.MeshEntity
Add() - Adds MeshEntity to RenderSystem
func (*RenderSystem) CompileLink ¶
func (r *RenderSystem) CompileLink() error
func (*RenderSystem) GetParticleBufferId ¶
func (r *RenderSystem) GetParticleBufferId() uint32
Get opengl buffer location id
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)