private void HiddenForm_FormClosing(object sender, FormClosingEventArgs e) { if (graph != null) { graph.Dispose(); } HdriManager.Release(); Materia.Material.PBRMaterial.ReleaseBRDF(); Materia.Material.Material.ReleaseAll(); Materia.Imaging.GLProcessing.ImageProcessor.ReleaseAll(); }
public void Release() { if (defaultBlack != null) { defaultBlack.Release(); defaultBlack = null; } if (defaultWhite != null) { defaultWhite.Release(); defaultWhite = null; } if (defaultGray != null) { defaultGray.Release(); defaultGray = null; } if (defaultDarkGray != null) { defaultDarkGray.Release(); defaultDarkGray = null; } HdriManager.Release(); if (mat != null) { mat.Release(); mat = null; } if (sphere != null) { sphere.Release(); sphere = null; } if (cube != null) { cube.Release(); cube = null; } if (glview != null) { FHost.Child = null; glview.Dispose(); glview = null; } }
public void Release() { if (renderStack != null) { renderStack.Release(); renderStack = null; } if (materialSettings != null) { materialSettings.Save(); } if (lightMat != null) { lightMat.Release(); lightMat = null; } if (defaultBlack != null) { defaultBlack.Release(); defaultBlack = null; } if (defaultWhite != null) { defaultWhite.Release(); defaultWhite = null; } if (defaultGray != null) { defaultGray.Release(); defaultGray = null; } if (defaultDarkGray != null) { defaultDarkGray.Release(); defaultDarkGray = null; } HdriManager.Release(); if (tessMat != null) { tessMat.Release(); tessMat = null; } if (mat != null) { mat.Release(); mat = null; } if (sphere != null) { sphere.Release(); sphere = null; } if (cube != null) { cube.Release(); cube = null; } if (cylinder != null) { cylinder.Release(); cylinder = null; } if (cubeRounded != null) { cubeRounded.Release(); cubeRounded = null; } if (plane != null) { plane.Release(); plane = null; } if (custom != null) { custom.Release(); custom = null; } if (lightMesh != null) { lightMesh.Release(); lightMesh = null; } if (glview != null) { FHost.Child = null; glview.Dispose(); glview = null; } }