internal static void UnloadData()
        {
            MyRenderTexturePool.ReleaseResources();
            AssertStructuresEmpty();

            m_prunningStructure.Clear();
            m_cullingStructure.Clear();
            m_manualCullingStructure.Clear();
            m_shadowPrunningStructure.Clear();
            m_farObjectsPrunningStructure.Clear();
            m_atmospherePurunnigStructure.Clear();
            m_nearObjects.Clear();

            Clear();

            //Remove all empty cull objects (they could be already added empty)
            foreach (var ro in m_renderObjects)
            {
                MyCullableRenderObject cullObject = ro.Value as MyCullableRenderObject;
                if (cullObject != null && cullObject.EntitiesContained == 0)
                {
                    m_renderObjectsToDraw.Add(cullObject);
                }
            }
            foreach (var cullObject in m_renderObjectsToDraw)
            {
                m_renderObjects.Remove(cullObject.ID);
                cullObject.UnloadContent();
            }
            m_renderObjectsToDraw.Clear();

            System.Diagnostics.Debug.Assert(m_renderObjects.Count == 0);
        }
 public MyOcclusionQueryIssue(MyCullableRenderObject cullObject)
 {
     CullObject = cullObject;
 }
Beispiel #3
0
 public MyOcclusionQueryIssue(MyCullableRenderObject cullObject)
 {
     CullObject = cullObject;
 }