Ejemplo n.º 1
0
        public override void OnClose()
        {
            if (objMeshs != null)
            {
                foreach (ObjGroup anObjMesh in objMeshs)
                {
                    anObjMesh.Dispose();
                }
            }
//            foreach (ObjGameObject aRenderGameObject in theRenderGameObjects)
//            {
//                aRenderGameObject.Dispose();
//            }
            if (theTileObjects != null)
            {
                foreach (ObjObject aObjObject in theTileObjects)
                {
                    aObjObject.Dispose();
                }
            }
            if (materialPoint != null)
            {
                materialPoint.Dispose();
            }
            foreach (KeyValuePair <Tile.TileIds, PlainBmpTexture> plainBmpTexture in tileTextures)
            {
                plainBmpTexture.Value.Material.Dispose();
            }
            program.DisposeChildren = true;
            program.Dispose();
        }
Ejemplo n.º 2
0
        public void Dispose()
        {
            for (int i = 0; i < Objects.Count; i++)
            {
                Objects[i].Dispose();
            }
            defaultMaterial.Dispose();
//            if (defaultProgram != null) defaultProgram.Dispose();
        }