Masterchoc

Untitled

Jan 1st, 2018
142
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if (e.type == SDL_WINDOWEVENT) {
  2.             switch (e.window.event) {
  3.             case SDL_WINDOWEVENT_MAXIMIZED:
  4.                     setWidth(e.window.data1);
  5.                     setHeight(e.window.data2);
  6.                 break;
  7.                 case SDL_WINDOWEVENT_SIZE_CHANGED:
  8.                     glViewport(0, 0, e.window.data1, e.window.data2);
  9.                     setWidth(e.window.data1);
  10.                     setHeight(e.window.data2);
  11.                     break;
  12.             }
  13.         }
RAW Paste Data