Blame c++/contourgl/glcontext.h

49e693
/*
49e693
    ......... 2015 Ivan Mahonin
49e693
49e693
    This program is free software: you can redistribute it and/or modify
49e693
    it under the terms of the GNU General Public License as published by
49e693
    the Free Software Foundation, either version 3 of the License, or
49e693
    (at your option) any later version.
49e693
49e693
    This program is distributed in the hope that it will be useful,
49e693
    but WITHOUT ANY WARRANTY; without even the implied warranty of
49e693
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
49e693
    GNU General Public License for more details.
49e693
49e693
    You should have received a copy of the GNU General Public License
49e693
    along with this program.  If not, see <http: licenses="" www.gnu.org="">.</http:>
49e693
*/
49e693
49e693
#ifndef _GLCONTEXT_H_
49e693
#define _GLCONTEXT_H_
49e693
49e693
#include <string></string>
49e693
49e693
#include <gl gl.h=""></gl>
49e693
#include <gl glext.h=""></gl>
49e693
#include <gl glx.h=""></gl>
49e693
49e693
49e693
class GlContext {
49e693
public:
49e693
	Display *display;
49e693
	GLXPbuffer pbuffer;
49e693
	GLXContext context;
49e693
49e693
	GLuint texture_id;
49e693
	GLuint framebuffer_id;
49e693
	GLuint renderbuffer_id;
49e693
49e693
	GLuint multisample_texture_id;
49e693
	GLuint multisample_renderbuffer_id;
49e693
	GLuint multisample_framebuffer_id;
49e693
f29469
	GlContext(int width, int height, bool hdr, bool multisample, int samples);
49e693
	~GlContext();
49e693
f29469
	void use();
f29469
	void unuse();
f29469
49e693
	void check(const std::string &s = std::string());
49e693
};
49e693
49e693
#endif