NewMesh creates and returns a pointer to a mesh with the specified geometry and material. If the mesh has multi materials, the material specified here must be nil and the individual materials must be add using "AddMaterial" or AddGroupMaterial".
(igeom geometry.IGeometry, imat material.IMaterial)
| 25 | // If the mesh has multi materials, the material specified here must be nil and the |
| 26 | // individual materials must be add using "AddMaterial" or AddGroupMaterial". |
| 27 | func NewMesh(igeom geometry.IGeometry, imat material.IMaterial) *Mesh { |
| 28 | |
| 29 | m := new(Mesh) |
| 30 | m.Init(igeom, imat) |
| 31 | return m |
| 32 | } |
| 33 | |
| 34 | // Init initializes the Mesh and its uniforms. |
| 35 | func (m *Mesh) Init(igeom geometry.IGeometry, imat material.IMaterial) { |