Debian Codegraph @

apps/kinect-stereo-calib/MyGLCanvas.h

raw symbols SCIP
1 /* +------------------------------------------------------------------------+
2 | Mobile Robot Programming Toolkit (MRPT) |
3 | https://www.mrpt.org/ |
4 | |
5 | Copyright (c) 2005-2026, Individual contributors, see AUTHORS file |
6 | See: https://www.mrpt.org/Authors - All rights reserved. |
7 | Released under BSD License. See: https://www.mrpt.org/License |
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 // This is funny... conflicts with X headers.
17 #undef Button1
18 #undef Button2
19 #undef Button3
20 // To avoid conflicts between Eigen & X11 headers
21 #ifdef Success
22 #undef Success
23 #endif
24
25 using namespace mrpt::gui;
26
27 // Allow RawlogViewer to build without 3D:
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 // Dummy class
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 // Have glut
69
70 #endif // MYGLCANVAS_H