Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2015-01-06 18:51:37 +0000
committerStijn Buys <ingar@osirion.org>2015-01-06 18:51:37 +0000
commit72ee43e9470c6fdbc6ed7ff92b85dfa5062c5762 (patch)
tree6474fa59066d5212dcd40e3d76652dce35565280 /src/client/savegamemenu.cc
parent57d958d40af061e83aa99ca12e375e5345836ecd (diff)
Added separate event handlers for mouse button clicks and mouse wheel movement.
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)