summaryrefslogtreecommitdiff
path: root/src/OffscreenContextAll.hpp
diff options
context:
space:
mode:
authordon bright <hugh.m.bright@gmail.com>2013-01-26 21:43:06 (GMT)
committerdon bright <hugh.m.bright@gmail.com>2013-01-26 21:43:06 (GMT)
commitfc72c861859feec3f0cf365392cfc60550a4c45a (patch)
tree455a0a0958c141a35bb45e35b43664c6a23a5d18 /src/OffscreenContextAll.hpp
parentd4c15a8fc428b88b52eb1e5c180999725e1cfb2b (diff)
windows needs binary-mode set for exporting png
Diffstat (limited to 'src/OffscreenContextAll.hpp')
-rw-r--r--src/OffscreenContextAll.hpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/OffscreenContextAll.hpp b/src/OffscreenContextAll.hpp
index 1c73b73..b0df83d 100644
--- a/src/OffscreenContextAll.hpp
+++ b/src/OffscreenContextAll.hpp
@@ -1,5 +1,5 @@
-// Functions shared by OffscreenContext[platform].cc (or .mm)
-// #include directly after definition of struct OffscreenContext.
+// Functions shared by OffscreenContext[platform].cc
+// #include this directly after definition of struct OffscreenContext.
void bind_offscreen_context(OffscreenContext *ctx)
{
@@ -11,7 +11,7 @@ void bind_offscreen_context(OffscreenContext *ctx)
*/
bool save_framebuffer(OffscreenContext *ctx, const char *filename)
{
- std::ofstream fstream(filename);
+ std::ofstream fstream(filename,std::ios::out|std::ios::binary);
if (!fstream.is_open()) {
std::cerr << "Can't open file " << filename << " for writing";
return false;
contact: Jan Huwald // Impressum