Tests & Snippets
minimal_gtk_epoxy.hpp
1 #ifndef GTKMM_EPOXY_MINIMAL_HPP_INCLUDED
2 #define GTKMM_EPOXY_MINIMAL_HPP_INCLUDED
3 
4 #include <gtkmm/glarea.h>
5 
6 class GLArea : public Gtk::GLArea {
7 
8  unsigned int VBO=0;
9  unsigned int EBO=0;
10  unsigned int VAO=0;
11  unsigned int shaderProgram=0;
12 
13 protected:
14 
15  bool check_compilation(uint i, int type, const char* who) const;
16 
17 public:
18 
19  GLArea();
20  virtual ~GLArea();
21  void make_triangle();
22 
23 public:
24 
25  void on_realize() override;
26  void on_unrealize() override;
27  bool on_render(const Glib::RefPtr<Gdk::GLContext>& context) override;
28  void on_resize(int w, int h) override;
29 };
30 
31 
32 #endif // GTKMM_EPOXY_MINIMAL_HPP_INCLUDED
GLArea
Definition: minimal_gtk_epoxy.hpp:6