func (d *Tri) PreRender() error {
	if s := core.FindNode(d.Shader); s != nil {
		shader, ok := s.(core.Shader)
		if !ok {
			return fmt.Errorf("Unable to find shader %v", d.Shader)
		}
		d.shader = shader
		geom := d.createMesh()
		core.AddNode(geom)
		d.geom = geom
	} else {
		return fmt.Errorf("Unable to find node (shader %v)", d.Shader)
	}
	return nil
}
PreRender implelments core.Node.
package light
import (
	"fmt"
	"github.com/jamiec7919/vermeer/builtin/geom/polymesh"
	"github.com/jamiec7919/vermeer/core"
	m "github.com/jamiec7919/vermeer/math"
	"github.com/jamiec7919/vermeer/math/ldseq"
	"github.com/jamiec7919/vermeer/nodes"
	"math"
)
type Tri struct {
	NodeDef    core.NodeDef `node:"-"`
	NodeName   string       `node:"Name"`
	P0, P1, P2 m.Vec3
	Shader     string
	Samples int
	shader core.Shader
	geom   core.Geom
}
func (d *Tri) Name() string { return d.NodeName }
func (d *Tri) Def() core.NodeDef { return d.NodeDef }