Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
S
SWE
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Gaurav Kukreja
SWE
Commits
d40e5496
Commit
d40e5496
authored
Oct 23, 2012
by
Sebastian Rettenberger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Increase fps
parent
b1686f8c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
3 deletions
+6
-3
swe_opengl.cpp
src/examples/swe_opengl.cpp
+2
-2
simulation.cu
src/opengl/simulation.cu
+1
-1
visualization.cpp
src/opengl/visualization.cpp
+3
-0
No files found.
src/examples/swe_opengl.cpp
View file @
d40e5496
...
@@ -37,8 +37,8 @@
...
@@ -37,8 +37,8 @@
#define SCREEN_WIDTH 800
#define SCREEN_WIDTH 800
#define SCREEN_HEIGHT 600
#define SCREEN_HEIGHT 600
// Number of nodes (not cells) of grid
// Number of nodes (not cells) of grid
#define GRID_XSIZE
80
1
#define GRID_XSIZE
56
1
#define GRID_YSIZE
80
1
#define GRID_YSIZE
56
1
#define WINDOW_TITLE "Shallow Water Equations v1.2"
#define WINDOW_TITLE "Shallow Water Equations v1.2"
/**
/**
...
...
src/opengl/simulation.cu
View file @
d40e5496
...
@@ -275,7 +275,7 @@ void Simulation::getScalingApproximation(float &bScale, float &bOffset, float &w
...
@@ -275,7 +275,7 @@ void Simulation::getScalingApproximation(float &bScale, float &bOffset, float &w
}
}
}
}
bOffset = 0; // This should be !=0 only in some artificial scenarios
bOffset = 0; // This should be !=0 only in some artificial scenarios
bScale = -
10
0/minB;
bScale = -
8
0/minB;
cout << "Scaling of bathymetry: " << bScale << endl;
cout << "Scaling of bathymetry: " << bScale << endl;
if ((maxH - minH) < 0.0001f) {
if ((maxH - minH) < 0.0001f) {
...
...
src/opengl/visualization.cpp
View file @
d40e5496
...
@@ -372,6 +372,9 @@ void Visualization::initSDL(int windowWidth, int windowHeight) {
...
@@ -372,6 +372,9 @@ void Visualization::initSDL(int windowWidth, int windowHeight) {
SDL_putenv
(
const_cast
<
char
*>
(
"SDL_VIDEO_CENTERED=center"
));
SDL_putenv
(
const_cast
<
char
*>
(
"SDL_VIDEO_CENTERED=center"
));
SDL_WM_SetCaption
(
"Loading..."
,
NULL
);
SDL_WM_SetCaption
(
"Loading..."
,
NULL
);
// Disable swap control
SDL_GL_SetAttribute
(
SDL_GL_SWAP_CONTROL
,
0
);
// Initialize window with OpenGL support
// Initialize window with OpenGL support
if
(
SDL_SetVideoMode
(
windowWidth
,
windowHeight
,
0
,
SDL_OPENGL
|
SDL_RESIZABLE
|
SDL_ANYFORMAT
)
==
NULL
)
{
if
(
SDL_SetVideoMode
(
windowWidth
,
windowHeight
,
0
,
SDL_OPENGL
|
SDL_RESIZABLE
|
SDL_ANYFORMAT
)
==
NULL
)
{
fprintf
(
stderr
,
"Unable to create OpenGL screen: %s
\n
"
,
SDL_GetError
());
fprintf
(
stderr
,
"Unable to create OpenGL screen: %s
\n
"
,
SDL_GetError
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment