Open ajon542 opened 8 years ago
When you close the SceneView with the "X" it will run the Destroy method. All seems fine if you do this method.
It's crashing on GL.DrawElements(mesh.RenderType, mesh.Indices.Count, DrawElementsType.UnsignedInt, 0);
In the SceneViewModel.Initialize method there is a boolean "isLoaded" which is set to true. A new GLControl is created in OnHostInitialized which would mean we should probably be initializing the scene again.
The Initialization procedure is a little confusing. Each scene is constructed quite early, prior to the GL context being created. I think the construction should be moved to where the initialization occurs.
Reproduction Steps: Views -> Scene (to close the SceneView) Views -> Scene (to open the SceneView) Select SceneView tab
Crash occurs.