summaryrefslogtreecommitdiff
path: root/src/OffscreenContextCGL.mm
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/OffscreenContextCGL.mm
parentd4c15a8fc428b88b52eb1e5c180999725e1cfb2b (diff)
windows needs binary-mode set for exporting png
Diffstat (limited to 'src/OffscreenContextCGL.mm')
-rw-r--r--src/OffscreenContextCGL.mm2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/OffscreenContextCGL.mm b/src/OffscreenContextCGL.mm
index c6d76ab..ab3cc1b 100644
--- a/src/OffscreenContextCGL.mm
+++ b/src/OffscreenContextCGL.mm
@@ -113,7 +113,7 @@ bool teardown_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()) {
PRINTB("Can't open file \"%s\" for writing", filename);
return false;
contact: Jan Huwald // Impressum