| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
#ifndef MYGLCANVAS_H |
| 11 |
#define MYGLCANVAS_H |
| 12 |
|
| 13 |
#include <mrpt/gui/CWxGLCanvasBase.h> |
| 14 |
#include <mrpt/system/datetime.h> |
| 15 |
|
| 16 |
|
| 17 |
#undef Button1 |
| 18 |
#undef Button2 |
| 19 |
#undef Button3 |
| 20 |
|
| 21 |
#ifdef Success |
| 22 |
#undef Success |
| 23 |
#endif |
| 24 |
|
| 25 |
using namespace mrpt::gui; |
| 26 |
|
| 27 |
|
| 28 |
#define KINECTSTEREO_HAS_3D (wxUSE_GLCANVAS && MRPT_HAS_OPENGL_GLUT) |
| 29 |
|
| 30 |
#if KINECTSTEREO_HAS_3D |
| 31 |
|
| 32 |
class CMyGLCanvas : public CWxGLCanvasBase |
| 33 |
{ |
| 34 |
public: |
| 35 |
CMyGLCanvas( |
| 36 |
wxWindow* parent, |
| 37 |
wxWindowID id = wxID_ANY, |
| 38 |
const wxPoint& pos = wxDefaultPosition, |
| 39 |
const wxSize& size = wxDefaultSize, |
| 40 |
long style = 0, |
| 41 |
const wxString& name = _T("CMyGLCanvas")); |
| 42 |
|
| 43 |
~CMyGLCanvas() override; |
| 44 |
|
| 45 |
void OnPreRender() override; |
| 46 |
void OnPostRender() override; |
| 47 |
void OnPostRenderSwapBuffers(double At, wxPaintDC& dc) override; |
| 48 |
void OnRenderError(const wxString& str) override; |
| 49 |
}; |
| 50 |
|
| 51 |
#else |
| 52 |
|
| 53 |
|
| 54 |
class CMyGLCanvas : public wxPanel |
| 55 |
{ |
| 56 |
public: |
| 57 |
CMyGLCanvas( |
| 58 |
wxWindow* parent, |
| 59 |
wxWindowID id = wxID_ANY, |
| 60 |
const wxPoint& pos = wxDefaultPosition, |
| 61 |
const wxSize& size = wxDefaultSize, |
| 62 |
long style = 0, |
| 63 |
const wxString& name = _T("CMyGLCanvas")) |
| 64 |
{ |
| 65 |
} |
| 66 |
}; |
| 67 |
|
| 68 |
#endif |
| 69 |
|
| 70 |
#endif |