WindowResize() static private méthode

Resizes the OpenGL viewport if the window is resized
static private WindowResize ( int newWidth, int newHeight ) : void
newWidth int
newHeight int
Résultat void
Exemple #1
0
 protected override void OnResize(EventArgs e)
 {
     if (Width == 0 && Height == 0)
     {
         /*
          * HACK: Don't resize if minimized
          *
          * Unsure if this is an openTK bug, Windows or what
          * but setting our width / height to zero breaks
          * stuff.....
          */
         Screen.Minimized = true;
         return;
     }
     Screen.Minimized = false;
     Screen.WindowResize(Width, Height);
 }
Exemple #2
0
 protected override void OnResize(EventArgs e)
 {
     Screen.WindowResize(Width, Height);
 }