]> git.jsancho.org Git - lugaru.git/blobdiff - Source/OpenGL_Windows.cpp
Set swap interval via SDL, enable by default
[lugaru.git] / Source / OpenGL_Windows.cpp
index 365e48a900e7e9eb37f49e6b8aad2d26952331ca..5d73e7a139c3e20217204ff9ec26082460baa005 100644 (file)
@@ -54,19 +54,11 @@ static bool save_png(const char * fname);
 
 #include "openal_wrapper.h"
 
-// ADDED GWC
-#ifdef _MSC_VER
-#pragma comment(lib, "opengl32.lib")
-#pragma comment(lib, "glu32.lib")
-#pragma comment(lib, "glaux.lib")
-#endif
-
 extern float multiplier;
 extern float sps;
 extern float realmultiplier;
 extern int slomo;
 extern bool cellophane;
-extern float terraindetail;
 extern float texdetail;
 
 extern bool osx;
@@ -231,7 +223,6 @@ Boolean SetUp (Game & game)
        osx = 0;
        cellophane=0;
        texdetail=4;
-       terraindetail=2;
        slomospeed=0.25;
        slomofreq=8012;
        numplayers=1;
@@ -305,6 +296,7 @@ Boolean SetUp (Game & game)
 
     SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
     SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 1);
+    SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, vblsync);
     
     if (SDL_SetVideoMode(kContextWidth, kContextHeight, 0, sdlflags) == NULL)
     {
@@ -681,7 +673,6 @@ int main(int argc, char **argv)
 
        try
        {
-               bool regnow = false;
                {
                        Game game;
                        pgame = &game;
@@ -740,7 +731,6 @@ int main(int argc, char **argv)
                                }
                        }
 
-                       regnow = game.registernow;
                }
                pgame = 0;