summaryrefslogtreecommitdiff
path: root/tests/OffscreenContext.mm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/OffscreenContext.mm')
-rw-r--r--tests/OffscreenContext.mm8
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;
contact: Jan Huwald // Impressum