Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/savegamemenu.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/client/savegamemenu.cc b/src/client/savegamemenu.cc
index c2601a5..d002b54 100644
--- a/src/client/savegamemenu.cc
+++ b/src/client/savegamemenu.cc
@@ -555,7 +555,14 @@ void SaveGameMenu::savescreenshot(std::string savename)
std::string filename(filesystem::writedir() + "savegames/" + savename + ".jpg");
// redraw the world without ui
-
+ /*
+ hack: win32 seems to have triple buffering or reads pixels from the wrong buffer
+ the workaround is to render the world twice
+ */
+
+#ifdef __WIN32
+ for (size_t i = 0; i < 2; ++i) {
+#endif
// Clear the color and depth buffers.
gl::clear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
@@ -571,7 +578,9 @@ void SaveGameMenu::savescreenshot(std::string savename)
gl::disable(GL_BLEND);
video::swap_buffers();
-
+#ifdef __WIN32
+ }
+#endif
render::Screenshot::savegameshot(filename);
}