// Start is called once at the start of the demo.
Start is called once at the start of the demo.
// Start is called once at the start of the demo .
func (t *Lines) Start(a *app.App) {
	geom := geometry.NewGeometry()
	vertices := math32.NewArrayF32(0, 16)
	vertices.Append(
		-0.5, 0.0, 0.0,
		0.5, 0.0, 0.0,
		0.0, -0.5, 0.0,
		0.0, 0.5, 0.0,
		0.0, 0.0, -0.5,
		0.0, 0.0, 0.5,
	)
	colors := math32.NewArrayF32(0, 16)
	colors.Append(
		1.0, 0.0, 0.0,
		1.0, 0.0, 0.0,
		0.0, 1.0, 0.0,
		0.0, 1.0, 0.0,
		0.0, 0.0, 1.0,
		0.0, 0.0, 1.0,
	)
	geom.AddVBO(gls.NewVBO(vertices).AddAttrib(gls.VertexPosition))
	geom.AddVBO(gls.NewVBO(colors).AddAttrib(gls.VertexColor))
	mat := material.NewBasic()
	lines1 := graphic.NewLines(geom, mat)
	a.Scene().Add(lines1)
}
func ( t * Lines ) Start ( a * app . App ) { geom := geometry . NewGeometry ( ) vertices := math32 . NewArrayF32 ( 0 , 16 ) vertices . Append ( - 0.5 , 0.0 , 0.0 , 0.5 , 0.0 , 0.0 , 0.0 , - 0.5 , 0.0 , 0.0 , 0.5 , 0.0 , 0.0 , 0.0 , - 0.5 , 0.0 , 0.0 , 0.5 , ) colors := math32 . NewArrayF32 ( 0 , 16 ) colors . Append ( 1.0 , 0.0 , 0.0 , 1.0 , 0.0 , 0.0 , 0.0 , 1.0 , 0.0 , 0.0 , 1.0 , 0.0 , 0.0 , 0.0 , 1.0 , 0.0 , 0.0 , 1.0 , ) geom . AddVBO ( gls . NewVBO ( vertices ) . AddAttrib ( gls . VertexPosition ) ) geom . AddVBO ( gls . NewVBO ( colors ) . AddAttrib ( gls . VertexColor ) ) mat := material . NewBasic ( ) lines1 := graphic . NewLines ( geom , mat ) a . Scene ( ) . Add ( lines1 ) }
Start is called once at the start of the demo.
Start is called once at the start of the demo .
// Creates geometry // Creates basic material // Creates lines with the specified geometry and material