Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/savegamemenu.cc')
-rw-r--r--src/client/savegamemenu.cc24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/client/savegamemenu.cc b/src/client/savegamemenu.cc
index b91a45c..c2601a5 100644
--- a/src/client/savegamemenu.cc
+++ b/src/client/savegamemenu.cc
@@ -12,9 +12,14 @@
#include "core/gameserver.h"
#include "model/material.h"
#include "client/savegamemenu.h"
+#include "client/video.h"
#include "filesystem/filesystem.h"
#include "render/screenshot.h"
+#include "render/camera.h"
+#include "render/draw.h"
#include "render/textures.h"
+#include "render/gl.h"
+
#include "ui/ui.h"
#include "sys/sys.h"
@@ -549,8 +554,25 @@ void SaveGameMenu::savescreenshot(std::string savename)
{
std::string filename(filesystem::writedir() + "savegames/" + savename + ".jpg");
- render::Screenshot::savegameshot(filename);
+ // redraw the world without ui
+
+ // Clear the color and depth buffers.
+ gl::clear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+
+ // set camera transformation
+ render::Camera::frame(0.0f);
+
+ render::Camera::frustum();
+
+ // draw the world
+ render::draw(0.0f);
+
+ gl::disable(GL_TEXTURE_2D);
+ gl::disable(GL_BLEND);
+
+ video::swap_buffers();
+ render::Screenshot::savegameshot(filename);
}
void SaveGameMenu::savegame(std::string savename, const std::string & description)