Debian Codegraph @

apps/holonomic-navigator-demo/MyGLCanvas.h

raw
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
15 using namespace mrpt::gui;
16
17 // Allow RawlogViewer to build without 3D:
18 #define APP_HAS_3D (wxUSE_GLCANVAS && MRPT_HAS_OPENGL_GLUT)
19
20 #if APP_HAS_3D
21
22 class CMyGLCanvas : public CWxGLCanvasBase
23 {
24 public:
25 CMyGLCanvas(
26 wxWindow* parent,
27 wxWindowID id = wxID_ANY,
28 const wxPoint& pos = wxDefaultPosition,
29 const wxSize& size = wxDefaultSize,
30 long style = 0,
31 const wxString& name = _T("CMyGLCanvas"));
32
33 ~CMyGLCanvas() override;
34
35 void OnPreRender() override;
36 void OnPostRender() override;
37 void OnPostRenderSwapBuffers(double At, wxPaintDC& dc) override;
38 void OnRenderError(const wxString& str) override;
39 };
40
41 #else
42
43 // Dummy class
44 class CMyGLCanvas : public wxPanel
45 {
46 public:
47 CMyGLCanvas(
48 wxWindow* parent,
49 wxWindowID id = wxID_ANY,
50 const wxPoint& pos = wxDefaultPosition,
51 const wxSize& size = wxDefaultSize,
52 long style = 0,
53 const wxString& name = _T("CMyGLCanvas"))
54 {
55 }
56 };
57
58 #endif
59
60 #endif // MYGLCANVAS_H