OpenBve.Renderer.ReAddObjects C# (CSharp) Méthode

ReAddObjects() private static méthode

private static ReAddObjects ( ) : void
Résultat void
        private static void ReAddObjects()
        {
            Object[] List = new Object[ObjectListCount];
            for (int i = 0; i < ObjectListCount; i++)
            {
                List[i] = ObjectList[i];
            }
            for (int i = 0; i < List.Length; i++)
            {
                HideObject(List[i].ObjectIndex);
            }
            for (int i = 0; i < List.Length; i++)
            {
                ShowObject(List[i].ObjectIndex, List[i].Type);
            }
        }

Usage Example

Exemple #1
0
 /// <summary>Resizes the OpenGL viewport if the window is resized</summary>
 internal static void WindowResize(int newWidth, int newHeight)
 {
     Width  = newWidth;
     Height = newHeight;
     if (Loading.Complete)
     {
         MainLoop.UpdateViewport(MainLoop.ViewPortChangeMode.NoChange);
         World.InitializeCameraRestriction();
         if (Renderer.OptionBackfaceCulling)
         {
             GL.Enable(EnableCap.CullFace);
         }
         else
         {
             GL.Disable(EnableCap.CullFace);
         }
         Renderer.ReAddObjects();
     }
     else
     {
         GL.Viewport(0, 0, Width, Height);
         GL.MatrixMode(MatrixMode.Projection);
         GL.LoadIdentity();
         GL.Ortho(0.0, (double)Width, (double)Height, 0.0, -1.0, 1.0);
     }
 }
All Usage Examples Of OpenBve.Renderer::ReAddObjects