1 #ifndef __OpenGLCanvas_hh__
2 #define __OpenGLCanvas_hh__
5 #include <bias_config.h>
7 #ifndef BIAS_HAVE_WXWIDGETS
8 # error Please recompile BIAS with USE_WXWIDGETS to use this lib.
9 #endif // BIAS_HAVE_WXWIDGETS
11 #ifndef BIAS_HAVE_OPENGL
12 # error Please recompile BIAS with USE_OPENGL to use this lib.
13 #endif // BIAS_HAVE_OPENGL
22 #ifndef OPENGLCANVAS_CONNECT_ONIDLE
23 # define OPENGLCANVAS_CONNECT_ONIDLE 1
24 #endif //OPENGLCANVAS_CONNECT_ONIDLE
31 #ifndef OPENGLCANVAS_DEFAULT_idleRepaintEnabled
32 # define OPENGLCANVAS_DEFAULT_idleRepaintEnabled true
37 #ifndef OPENGLCANVAS_DEFAULT_realtimeAnimation
38 # define OPENGLCANVAS_DEFAULT_realtimeAnimation true
43 #define TARGET_FPS 200
49 #include <Gui/OpenGLCanvasBase.hh>
50 #include <Gui/CameraViewController.hh>
77 ,
const wxPoint& pos = wxDefaultPosition
78 ,
const wxSize& size = wxDefaultSize
80 ,
const wxString& name =
AsciiToWx(
"OpenGLCanvas")
81 ,
int* attribList = NULL
82 ,
const wxPalette& palette = wxNullPalette
89 ,wxGLContext* sharedContext = NULL
91 ,
const wxPoint& pos = wxDefaultPosition
92 ,
const wxSize& size = wxDefaultSize
94 ,
const wxString& name=
AsciiToWx(
"OpenGLCanvas")
96 ,
const wxPalette& palette = wxNullPalette
99 virtual void InitMembers();
101 virtual void GetInfoGL(std::ostream & os=std::cout);
104 virtual void Display();
106 virtual void DisplayCameraView();
107 virtual void DisplayCameraViewInternalParams();
108 virtual void DisplayCameraViewExternalParams();
111 virtual void UpdateTime();
114 virtual void Reshape();
116 void OnMotion( wxMouseEvent &event );
117 void OnMouseDown( wxMouseEvent &event );
118 void OnMouseWheel( wxMouseEvent &event );
119 void OnIdle(wxIdleEvent& event);
147 DECLARE_EVENT_TABLE()
static bool realtimeAnimation
wxString AsciiToWx(const char *thestring)
Converts a C string to a wxString.
OpenGL canvases with additinal event handling (JW)
base for (interactively) manipulating a (virtual) camera view.
base class for OpenGL canvases you could derive from to get base functionality (JW) ...
CameraViewController * p_viewCtrl_
static bool idleRepaintEnabled