diff options
author | Marius Kintel <marius@kintel.net> | 2011-07-31 01:12:27 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2011-07-31 01:12:27 (GMT) |
commit | 2b0035175dd3bc5c66a3350cab6e9f7f7b8f01d4 (patch) | |
tree | 5bfb1c7f9f37c04d5717c3eec62bd4fb45e947b8 /tests/OffscreenContext.h | |
parent | 6882228058d313bb7b98fddd90239bdb1a3e25ef (diff) |
One step further on a Qt-free offscreen renderer
Diffstat (limited to 'tests/OffscreenContext.h')
-rw-r--r-- | tests/OffscreenContext.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/OffscreenContext.h b/tests/OffscreenContext.h new file mode 100644 index 0000000..59b6e2d --- /dev/null +++ b/tests/OffscreenContext.h @@ -0,0 +1,13 @@ +#ifndef OFFSCREENCONTEXT_H_ +#define OFFSCREENCONTEXT_H_ + +#include <OpenGL/OpenGL.h> +#include <iostream> // for error output + +#define REPORTGLERROR(task) { GLenum tGLErr = glGetError(); if (tGLErr != GL_NO_ERROR) { std::cout << "OpenGL error " << tGLErr << " while " << task << "\n"; } } + +struct OffscreenContext *create_offscreen_context(int w, int h); +bool teardown_offscreen_context(OffscreenContext *ctx); +bool save_framebuffer(OffscreenContext *ctx, const char *filename); + +#endif |