Advertisement
Masterchoc

Untitled

Jan 1st, 2018
438
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.35 KB | None | 0 0
  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.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement