diff options
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 24 |
1 files changed, 15 insertions, 9 deletions
@@ -246,12 +246,17 @@ typedef struct VideoModeStruct VideoModeStruct VideoModeList[] = { { 512, 384, 0 }, { 640, 480, 0 }, +{ 720, 480, 0 }, { 800, 600, 0 }, { 1024, 768, 0 }, { 1152, 864, 0 }, -{ 1280, 960, 0, }, +{ 1280, 720, 0 }, +{ 1280, 768, 0 }, +{ 1280, 960, 0 }, { 1280, 1024, 0 }, -{ 1600, 1200, 0 } +{ 1600, 1200, 0 }, +{ 1920, 1080, 0 }, +{ 1920, 1200, 0 } }; int CurrentVideoMode; @@ -361,7 +366,8 @@ int InitSDL() atexit(SDL_Quit); - SDL_AvailableVideoModes = SDL_ListModes(NULL, SDL_FULLSCREEN | SDL_OPENGL); + // needs to be cleaned up; SDL_VideoModeOK and SDL_ListModes aren't compatible + SDL_AvailableVideoModes = (SDL_Rect **)-1; //SDL_ListModes(NULL, SDL_FULLSCREEN | SDL_OPENGL); if (SDL_AvailableVideoModes == NULL) return -1; @@ -544,7 +550,6 @@ int SetOGLVideoMode(int Width, int Height) { SDL_GrabMode isgrab; int flags; - char *ext; ScanDrawMode = ScanDrawD3DHardwareRGB; GotMouse = 1; @@ -580,7 +585,12 @@ int SetOGLVideoMode(int Width, int Height) SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 5); SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 16); SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); - + + // These should be configurable video options. + //SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 1); + //SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, 4); + SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, 1); + if ((surface = SDL_SetVideoMode(Width, Height, 0, flags)) == NULL) { fprintf(stderr, "(OpenGL) SDL SetVideoMode failed: %s\n", SDL_GetError()); exit(EXIT_FAILURE); @@ -624,8 +634,6 @@ int SetOGLVideoMode(int Width, int Height) pglClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - pglHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); - ScreenDescriptorBlock.SDB_Width = Width; ScreenDescriptorBlock.SDB_Height = Height; ScreenDescriptorBlock.SDB_CentreX = Width/2; @@ -637,8 +645,6 @@ int SetOGLVideoMode(int Width, int Height) ScreenDescriptorBlock.SDB_ClipUp = 0; ScreenDescriptorBlock.SDB_ClipDown = Height; - ext = (char *) pglGetString(GL_EXTENSIONS); - load_ogl_functions(1); InitOpenGL(); |
