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/render.cc')
-rw-r--r--src/render/render.cc17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/render/render.cc b/src/render/render.cc
index fbbaba1..55756d9 100644
--- a/src/render/render.cc
+++ b/src/render/render.cc
@@ -43,9 +43,6 @@ void func_list_textures(std::string const &args)
void reset_gl()
{
- // setup our viewport.
- gl::viewport(0, 0, Camera::width(), Camera::height());
-
// set clear color
gl::clearcolor(0.0f, 0.0f, 0.0f, 1.0f);
@@ -152,6 +149,13 @@ void init()
func->set_info("list loaded textures");
}
+void resize(int width, int height)
+{
+ // setup our viewport.
+ gl::viewport(0, 0, width, height);
+ Camera::resize(width, height);
+}
+
// unload game assets (zone change)
void unload()
{
@@ -313,8 +317,15 @@ void screenshot()
image.flip();
if (filetype == TYPEPNG) {
+/* if ((Camera::width() % 8 != 0 ) || (Camera::height() % 8 != 0 )) {
+ image.pad();
+ }*/
render::PNG::save(filename.c_str(), image);
} else if (filetype == TYPEJPG) {
+/* if ((Camera::width() % 8 != 0 ) || (Camera::height() % 8 != 0 )) {
+ image.pad();
+ }
+*/
render::JPG::save(filename.c_str(), image, (int) screenshotquality->value());
} else if (filetype == TYPETGA) {
render::TGA::save(filename.c_str(), image);