27 #if MRPT_HAS_WXWIDGETS 29 #include <wx/string.h> 31 #include <wx/bitmap.h> 34 #include <wx/artprov.h> 36 #include <wx/msgdlg.h> 37 #include <wx/filedlg.h> 38 #include <wx/progdlg.h> 39 #include <wx/imaglist.h> 40 #include <wx/busyinfo.h> 42 #include <wx/textdlg.h> 43 #include <wx/dirdlg.h> 44 #include <wx/colordlg.h> 45 #include <wx/dcmemory.h> 47 #if wxUSE_GLCANVAS && MRPT_HAS_OPENGL_GLUT 49 #include <wx/glcanvas.h> 50 #include <wx/dcclient.h> 68 class CWxGLCanvasBase :
public CGlCanvasBase,
74 wxWindow* parent, wxWindowID
id = wxID_ANY,
75 const wxPoint& pos = wxDefaultPosition,
76 const wxSize&
size = wxDefaultSize,
long style = 0,
77 const wxString&
name = _T(
"CWxGLCanvasBase"));
79 virtual ~CWxGLCanvasBase();
81 void OnPaint(wxPaintEvent& event);
82 void OnSize(wxSizeEvent& event);
83 void OnEraseBackground(wxEraseEvent& event);
84 void OnEnterWindow(wxMouseEvent& event);
86 void OnChar(wxKeyEvent& event);
88 void OnMouseDown(wxMouseEvent& event);
89 void OnMouseMove(wxMouseEvent& event);
90 void OnMouseUp(wxMouseEvent&);
91 void OnMouseWheel(wxMouseEvent& event);
103 virtual void OnPreRender() {}
104 virtual void OnPostRender() {}
105 virtual void OnPostRenderSwapBuffers(
double At, wxPaintDC& dc)
113 wxGLContext* m_gl_context =
nullptr;
117 unsigned long m_StartTime = 0;
118 unsigned long m_LastTime = 0;
119 unsigned long m_LastRedraw = 0;
122 void OnWindowCreation(wxWindowCreateEvent& ev);
123 virtual void swapBuffers()
override;
124 virtual void preRender()
override;
125 virtual void postRender()
override;
126 virtual void renderError(
const std::string& err_msg)
override;
133 #endif // wxUSE_GLCANVAS 134 #endif // MRPT_HAS_WXWIDGETS 135 #endif // CMyGLCanvas_H
Keeps a list of text messages which can be rendered to OpenGL contexts by graphic classes...
#define MRPT_UNUSED_PARAM(a)
Can be used to avoid "not used parameters" warnings from the compiler.
GLsizei const GLchar ** string
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
GLuint const GLchar * name