SHARE
TWEET

Untitled

a guest Jun 19th, 2017 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "stdafx.h"
  2.  
  3. #ifdef __cplusplus
  4. extern "C"
  5. #endif
  6.  
  7. SDL_Surface* screen;
  8.  
  9. int multisample_level = 16;
  10. int SCREEN_RES[2] = {800,600};
  11.  
  12. int main(int argc, char** argv) {
  13.     SDL_Init(SDL_INIT_EVERYTHING);
  14.     TTF_Init();
  15.  
  16.     SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER,1);
  17.     Uint32 screenflags = SDL_HWSURFACE|SDL_OPENGL|SDL_RESIZABLE;
  18.  
  19.     char caption[] = "CS412 HW 5 - Ian Mallett";
  20.     SDL_WM_SetCaption(caption,caption);
  21.  
  22.     SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS,1);
  23.     SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES,multisample_level);
  24.  
  25.     screen = SDL_SetVideoMode(SCREEN_RES[0],SCREEN_RES[1],32,screenflags);
  26.  
  27.     return 1;
  28. }
RAW Paste Data
Top