summaryrefslogtreecommitdiff
path: root/tests/OffscreenContext.h
blob: 59b6e2df8131b38986984b3f68f080e130842a10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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
contact: Jan Huwald // Impressum