コード例 #1
0
        internal static void OnDeviceReset()
        {
            MyHwBuffers.OnDeviceReset();
            MyShaders.OnDeviceReset();
            MyMaterialShaders.OnDeviceReset();
            MyPipelineStates.OnDeviceReset();
            MyTextures.OnDeviceReset();
            MyRwTextures.OnDeviceEnd();
            MyShadows.OnDeviceReset();
            MyBillboardRenderer.OnDeviceRestart();

            MyMeshMaterials1.InvalidateMaterials();
            MyVoxelMaterials1.InvalidateMaterials();

            MyRenderableComponent.MarkAllDirty();
            foreach (var f in MyComponentFactory <MyFoliageComponent> .GetAll())
            {
                f.Dispose();
            }

            foreach (var c in MyComponentFactory <MyGroupRootComponent> .GetAll())
            {
                c.OnDeviceReset();
            }

            MyBigMeshTable.Table.OnDeviceReset();
            MySceneMaterials.OnDeviceReset();
            MyMeshes.OnDeviceReset();
            MyInstancing.OnDeviceReset();
        }
コード例 #2
0
ファイル: MyRender-Content.cs プロジェクト: viktorius/Viktor
        private static void OnDeviceReset()
        {
            MyManagers.OnDeviceReset();

            MyShaders.OnDeviceReset();
            MyMaterialShaders.OnDeviceReset();

            MyTransparentRendering.OnDeviceReset();

            ResetShadows(MyShadowCascades.Settings.NewData.CascadesCount, Settings.User.ShadowQuality.ShadowCascadeResolution());

            MyBillboardRenderer.OnDeviceReset();
            MyScreenDecals.OnDeviceReset();

            MyMeshMaterials1.OnDeviceReset();
            MyVoxelMaterials1.OnDeviceReset();

            MyRenderableComponent.MarkAllDirty();
            foreach (var f in MyComponentFactory <MyFoliageComponent> .GetAll())
            {
                f.Dispose();
            }

            foreach (var c in MyComponentFactory <MyGroupRootComponent> .GetAll())
            {
                c.OnDeviceReset();
            }

            MyBigMeshTable.Table.OnDeviceReset();
            MySceneMaterials.OnDeviceReset();
            MyMeshes.OnDeviceReset();
            MyInstancing.OnDeviceReset();
            MyScreenDecals.OnDeviceReset();
        }
コード例 #3
0
        internal static void OnDeviceReset()
        {
            MyHwBuffers.OnDeviceReset();
            MyShaders.OnDeviceReset();
            MyMaterialShaders.OnDeviceReset();
            MyPipelineStates.OnDeviceReset();
            MyTextures.OnDeviceReset();
            MyRwTextures.OnDeviceReset();
            MyTransparentRendering.OnDeviceReset();

            ResetShadows(Settings.ShadowCascadeCount, RenderSettings.ShadowQuality.ShadowCascadeResolution());

            MyBillboardRenderer.OnDeviceRestart();
            MyScreenDecals.OnDeviceReset();

            MyMeshMaterials1.InvalidateMaterials();
            MyVoxelMaterials1.InvalidateMaterials();

            MyRenderableComponent.MarkAllDirty();
            foreach (var f in MyComponentFactory <MyFoliageComponent> .GetAll())
            {
                f.Dispose();
            }

            foreach (var c in MyComponentFactory <MyGroupRootComponent> .GetAll())
            {
                c.OnDeviceReset();
            }

            MyBigMeshTable.Table.OnDeviceReset();
            MySceneMaterials.OnDeviceReset();
            MyMeshes.OnDeviceReset();
            MyInstancing.OnDeviceReset();
            MyScreenDecals.OnDeviceReset();
        }