summaryrefslogtreecommitdiff
path: root/src/my_gtk_gl_scene_widget.hpp
diff options
context:
space:
mode:
authorLudovic Pouzenc <ludovic@pouzenc.fr>2013-03-03 13:56:50 +0000
committerLudovic Pouzenc <ludovic@pouzenc.fr>2013-03-03 13:56:50 +0000
commitdcbaaf5bb09caf07f27c03f3c3db196542668b4a (patch)
tree3d74622e716c3bc58ceeefdb422c5c1c68b4e4a9 /src/my_gtk_gl_scene_widget.hpp
parent8c587d2243884d85bbe5fadac64258ac246617b4 (diff)
download2013-gpudataviz-dcbaaf5bb09caf07f27c03f3c3db196542668b4a.tar.gz
2013-gpudataviz-dcbaaf5bb09caf07f27c03f3c3db196542668b4a.tar.bz2
2013-gpudataviz-dcbaaf5bb09caf07f27c03f3c3db196542668b4a.zip
Standardisation des extensions.
Avancee sur l'initialisation des VBO mais je galere a trouver un (bon) moyen de charger les fonctions OpenGL qui vont bien. git-svn-id: file:///var/svn/2013-gpudataviz/trunk@17 371a6b4a-a258-45f8-9dcc-bdd82ce0ac9d
Diffstat (limited to 'src/my_gtk_gl_scene_widget.hpp')
-rw-r--r--src/my_gtk_gl_scene_widget.hpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/my_gtk_gl_scene_widget.hpp b/src/my_gtk_gl_scene_widget.hpp
new file mode 100644
index 0000000..212f346
--- /dev/null
+++ b/src/my_gtk_gl_scene_widget.hpp
@@ -0,0 +1,29 @@
+#ifndef MY_GTK_GL_SCENE_H
+#define MY_GTK_GL_SCENE_H
+
+#include "gtk_includes.hpp"
+
+// Class that will contain all the OpenGL logic for displaying the OpenCL computed data
+// Implementation is kept in gpudataviz.cc (I want to keep interesting code part in this file)
+
+class MyGTKGLSceneWidget : public Gtk::DrawingArea, public Gtk::GL::Widget<MyGTKGLSceneWidget>
+{
+ public:
+ MyGTKGLSceneWidget(Glib::RefPtr<Gdk::GL::Config> &glconfig);
+ virtual ~MyGTKGLSceneWidget();
+
+ protected:
+ virtual void on_size_request(Gtk::Requisition* requisition);
+ virtual void on_realize();
+ virtual bool on_configure_event(GdkEventConfigure* event);
+ virtual bool on_expose_event(GdkEventExpose* event);
+ virtual bool on_motion_notify_event (GdkEventMotion *event);
+ virtual bool on_button_press_event(GdkEventButton *event);
+ virtual bool on_button_release_event(GdkEventButton *event);
+
+ bool do_mouse_logic(GdkEventType type, guint state, guint x, guint y);
+ private:
+ struct camera_params { float rx; float ry; float tz; } camera;
+};
+
+#endif /*MY_GTK_GL_SCENE_H*/