SHARE
TWEET

Resolution

a guest Mar 11th, 2012 91 Never
  1. class Resolution{
  2.  
  3. public:
  4.  
  5. static void ChangeResolution(SDL_Surface* Screen,int Width,int Height){
  6. Screen = SDL_SetVideoMode(Width, Height, 32, SDL_HWSURFACE | SDL_GL_DOUBLEBUFFER | SDL_OPENGL);
  7. glClearColor(0, 0, 0, 0);
  8. glClearDepth(1.0f);
  9.  
  10. glViewport(0, 0, Width, Height);
  11.  
  12. glMatrixMode(GL_PROJECTION);
  13. glLoadIdentity();
  14.  
  15. glOrtho(0, Width, Height, 0, 1, -1);
  16.  
  17. glMatrixMode(GL_MODELVIEW);
  18.  
  19. glEnable(GL_TEXTURE_2D);
  20.  
  21. glLoadIdentity();
  22. }
  23.  
  24. };
RAW Paste Data
Top