leonsal %!s(int64=8) %!d(string=hai) anos
pai
achega
a88e895c1f
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      graphic/graphic.go

+ 6 - 0
graphic/graphic.go

@@ -43,6 +43,12 @@ type IGraphic interface {
 	RenderSetup(gs *gls.GLS, rinfo *core.RenderInfo)
 }
 
+func NewGraphic(igeom geometry.IGeometry, mode uint32) *Graphic {
+
+	gr := new(Graphic)
+	return gr.Init(igeom, mode)
+}
+
 // Init initializes a Graphic type embedded in another type
 // with the specified geometry and OpenGL mode.
 func (gr *Graphic) Init(igeom geometry.IGeometry, mode uint32) *Graphic {