예제 #1
0
        void GraphicsDevice_ResetDevice()
        {
            if (deviceEvent == 0)
            {
                return;
            }
            deviceEvent--;
            Renderer.OnResetDevice(Scene.View);

            foreach (Entity e in resources.Keys)
            {
                cachedEntities.Add(e);
                if (Renderer.Settings.ShadowQuality != Settings.ShadowQualities.NoShadows)
                {
                    cachedShadowEntities.Add(e);
                }

                foreach (Graphics.Content.MetaModel metaModel in e.AllGraphics)
                {
                    AddRenderable(e, metaModel);
                }
            }
        }