示例#1
0
/* Sets up a geometry pass.
 * A geometry buffer of the given bufferWidth x bufferHeight will be created automatically */
func NewLinePass() *LinePass {
	mat := assets.GetMaterialCached("lines")
	p := &LinePass{
		Material: mat,
	}
	return p
}
示例#2
0
func CreateLines() *Lines {
	l := &Lines{
		Lines:    make([]Line, 0, 0),
		Material: assets.GetMaterialCached("lines"),
		Width:    10.0,
		vao:      render.CreateVertexArray(),
		vbo:      render.CreateVertexBuffer(),
	}
	l.Compute()
	return l
}