Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/screenshot.cc')
-rw-r--r--src/render/screenshot.cc25
1 files changed, 3 insertions, 22 deletions
diff --git a/src/render/screenshot.cc b/src/render/screenshot.cc
index 2fd7e9a..0142ad3 100644
--- a/src/render/screenshot.cc
+++ b/src/render/screenshot.cc
@@ -20,7 +20,7 @@
#include "render/tgafile.h"
#include "render/gl.h"
-#include <SDL/SDL.h>
+#include <SDL2/SDL.h>
namespace render
{
@@ -34,25 +34,6 @@ int Screenshot::current_date = 0;
void Screenshot::savegameshot(const std::string & filename)
{
- // TODO do the actual drawing
-
- // Clear the color and depth buffers.
- gl::clear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
- // set camera transformation
- Camera::frame(0.0f);
-
- render::Camera::frustum();
-
- // draw the world
- draw(0.0f);
-
- gl::disable(GL_TEXTURE_2D);
- gl::disable(GL_BLEND);
-
- // swap GL buffers
- SDL_GL_SwapBuffers();
-
int w = State::width();
int h = State::height();
@@ -62,7 +43,7 @@ void Screenshot::savegameshot(const std::string & filename)
if ((w > 0) && (h > 0)) {
// read pixels into an image instance
- render::Image image(w, h, 3);
+ Image image(w, h, 3);
glReadPixels(
(GLsizei) ((State::width() - w) / 2),
@@ -76,7 +57,7 @@ void Screenshot::savegameshot(const std::string & filename)
con_debug << "Saving " << filename << std::endl;
- render::JPG::save(filename.c_str(), image, 85);
+ JPG::save(filename.c_str(), image, 85);
}
}
void Screenshot::save()