summaryrefslogtreecommitdiff
path: root/tests/OffscreenView.h
blob: 52ee3af3acd71e35bdf767adedec00bfc4b319f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef OFFSCREENVIEW_H_
#define OFFSCREENVIEW_H_

#include "OffscreenContext.h"
#include <stdint.h>

class OffscreenView
{
public:
	OffscreenView(size_t width, size_t height);
	~OffscreenView();
	void setRenderer(class Renderer* r);

	void initializeGL();
	void resizeGL(int w, int h);
	void setupPerspective();
	void setupOrtho(double distance,bool offset=false);
	void paintGL();
	bool save(const char *filename);

	GLint shaderinfo[11];
	OffscreenContext *ctx;
private:
	Renderer *renderer;
	double w_h_ratio;

	bool orthomode;
	bool showaxes;
	bool showfaces;
	bool showedges;
	float viewer_distance;
};

#endif
contact: Jan Huwald // Impressum