Increase fps

parent b1686f8c
......@@ -37,8 +37,8 @@
#define SCREEN_WIDTH 800
#define SCREEN_HEIGHT 600
// Number of nodes (not cells) of grid
#define GRID_XSIZE 801
#define GRID_YSIZE 801
#define GRID_XSIZE 561
#define GRID_YSIZE 561
#define WINDOW_TITLE "Shallow Water Equations v1.2"
/**
......
......@@ -275,7 +275,7 @@ void Simulation::getScalingApproximation(float &bScale, float &bOffset, float &w
}
}
bOffset = 0; // This should be !=0 only in some artificial scenarios
bScale = -100/minB;
bScale = -80/minB;
cout << "Scaling of bathymetry: " << bScale << endl;
if ((maxH - minH) < 0.0001f) {
......
......@@ -372,6 +372,9 @@ void Visualization::initSDL(int windowWidth, int windowHeight) {
SDL_putenv(const_cast<char *>("SDL_VIDEO_CENTERED=center"));
SDL_WM_SetCaption("Loading...", NULL);
// Disable swap control
SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, 0);
// Initialize window with OpenGL support
if ( SDL_SetVideoMode(windowWidth, windowHeight, 0, SDL_OPENGL | SDL_RESIZABLE | SDL_ANYFORMAT) == NULL ) {
fprintf(stderr, "Unable to create OpenGL screen: %s\n", SDL_GetError());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment