|
@@ -18,14 +18,6 @@ type Lines struct {
|
|
|
uniMVPm gls.Uniform // Model view projection matrix uniform location cache
|
|
uniMVPm gls.Uniform // Model view projection matrix uniform location cache
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// Init initializes the Lines object and adds the specified material.
|
|
|
|
|
-func (l *Lines) Init(igeom geometry.IGeometry, imat material.IMaterial) {
|
|
|
|
|
-
|
|
|
|
|
- l.Graphic.Init(igeom, gls.LINES)
|
|
|
|
|
- l.AddMaterial(l, imat, 0, 0)
|
|
|
|
|
- l.uniMVPm.Init("MVP")
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
// NewLines returns a pointer to a new Lines object.
|
|
// NewLines returns a pointer to a new Lines object.
|
|
|
func NewLines(igeom geometry.IGeometry, imat material.IMaterial) *Lines {
|
|
func NewLines(igeom geometry.IGeometry, imat material.IMaterial) *Lines {
|
|
|
|
|
|
|
@@ -34,6 +26,14 @@ func NewLines(igeom geometry.IGeometry, imat material.IMaterial) *Lines {
|
|
|
return l
|
|
return l
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+// Init initializes the Lines object and adds the specified material.
|
|
|
|
|
+func (l *Lines) Init(igeom geometry.IGeometry, imat material.IMaterial) {
|
|
|
|
|
+
|
|
|
|
|
+ l.Graphic.Init(igeom, gls.LINES)
|
|
|
|
|
+ l.AddMaterial(l, imat, 0, 0)
|
|
|
|
|
+ l.uniMVPm.Init("MVP")
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
// RenderSetup is called by the engine before drawing this geometry.
|
|
// RenderSetup is called by the engine before drawing this geometry.
|
|
|
func (l *Lines) RenderSetup(gs *gls.GLS, rinfo *core.RenderInfo) {
|
|
func (l *Lines) RenderSetup(gs *gls.GLS, rinfo *core.RenderInfo) {
|
|
|
|
|
|