// 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 *Points) Start(a *app.App) {
	axes := helper.NewAxes(2)
	a.Scene().Add(axes)
	geom := geometry.NewGeometry()
	positions := math32.NewArrayF32(0, 0)
	positions.Append(
		1, 1, 1,
		1, 1, -1,
		-1, 1, -1,
		-1, 1, 1,
		1, -1, 1,
		1, -1, -1,
		-1, -1, -1,
		-1, -1, 1,
		0, 1, 0,
		0, 0, -1,
		0, -1, 0,
		1, 0, 0,
		-1, 0, 0,
		0, 0, 1,
		0, 0, 0,
	)
	geom.AddVBO(gls.NewVBO(positions).AddAttrib(gls.VertexPosition))
	positions = nil 
	mat := material.NewPoint(&math32.Color{0, 0, 0})
	mat.SetSize(50)
	mesh := graphic.NewPoints(geom, mat)
	mesh.SetScale(1, 1, 1)
	a.Scene().Add(mesh)
}
func ( t * Points ) Start ( a * app . App ) { axes := helper . NewAxes ( 2 ) a . Scene ( ) . Add ( axes ) geom := geometry . NewGeometry ( ) positions := math32 . NewArrayF32 ( 0 , 0 ) positions . Append ( 1 , 1 , 1 , 1 , 1 , - 1 , - 1 , 1 , - 1 , - 1 , 1 , 1 , 1 , - 1 , 1 , 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , 1 , 0 , 1 , 0 , 0 , 0 , - 1 , 0 , - 1 , 0 , 1 , 0 , 0 , - 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , ) geom . AddVBO ( gls . NewVBO ( positions ) . AddAttrib ( gls . VertexPosition ) ) positions = nil mat := material . NewPoint ( & math32 . Color { 0 , 0 , 0 } ) mat . SetSize ( 50 ) mesh := graphic . NewPoints ( geom , mat ) mesh . SetScale ( 1 , 1 , 1 ) a . Scene ( ) . Add ( mesh ) }
Start is called once at the start of the demo.
Start is called once at the start of the demo .
// Create axes helper // Creates geometry // Positions cannot be used after transfering to VBO // Creates point material // Creates points mesh