Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (e.type == SDL_WINDOWEVENT) {
- switch (e.window.event) {
- case SDL_WINDOWEVENT_MAXIMIZED:
- setWidth(e.window.data1);
- setHeight(e.window.data2);
- break;
- case SDL_WINDOWEVENT_SIZE_CHANGED:
- glViewport(0, 0, e.window.data1, e.window.data2);
- setWidth(e.window.data1);
- setHeight(e.window.data2);
- break;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement