private void Reset() { mShouldRedraw = true; mModel?.Dispose(); mModel = null; ResetCamera(); }
public void SetModel(Model model, TextureSet textureSet) { if (mDefaultShader == null || mGridShader == null) { return; } mModel?.Dispose(); mModel = new GLModel(model, textureSet); var bSphere = new BoundingSphere(); foreach (var mesh in model.Meshes) { bSphere.Merge(mesh.BoundingSphere); } SetDefaultCamera(bSphere); }