diff options
author | Don Bright <hugh.m.bright@gmail.com> | 2011-11-13 20:34:01 (GMT) |
---|---|---|
committer | Don Bright <hugh.m.bright@gmail.com> | 2011-11-13 20:34:01 (GMT) |
commit | c4231685f6cba5feec8bcec324a3fd884687d56e (patch) | |
tree | 37d0406d3017b509e147f88fea91e4972dfd2d48 /tests/OffscreenContext.mm | |
parent | 1f9ce62573b65715e7b134ad4d8c8079fc28aa44 (diff) |
option '--info' to opencsgtest for windows. also output html + wiki code.
Diffstat (limited to 'tests/OffscreenContext.mm')
-rw-r--r-- | tests/OffscreenContext.mm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/OffscreenContext.mm b/tests/OffscreenContext.mm index 140516f..baa39e0 100644 --- a/tests/OffscreenContext.mm +++ b/tests/OffscreenContext.mm @@ -16,6 +16,13 @@ struct OffscreenContext fbo_t *fbo; }; +string offscreen_context_getinfo(OffscreenContext *ctx) +{ + sstream result; + result << "OS info: Mac OSX\n"; + result << "Machine: Apple(TM) Mac(TM)\n"; + return result.str(); +} OffscreenContext *create_offscreen_context(int w, int h) { @@ -94,6 +101,7 @@ bool teardown_offscreen_context(OffscreenContext *ctx) */ bool save_framebuffer(OffscreenContext *ctx, const char *filename) { + if (!ctx || !filename) return false; // Read pixels from OpenGL int samplesPerPixel = 4; // R, G, B and A int rowBytes = samplesPerPixel * ctx->width; |