Use an unique opengl context

This commit is contained in:
Enrico Turri 2018-10-04 10:41:11 +02:00
parent f31cf684cb
commit 96745e12d7
8 changed files with 91 additions and 7 deletions

View file

@ -552,11 +552,17 @@ public:
GLCanvas3D(wxGLCanvas* canvas);
~GLCanvas3D();
wxGLCanvas* widget() { return m_canvas; }
#if ENABLE_USE_UNIQUE_GLCONTEXT
void set_context(wxGLContext* context) { m_context = context; }
#endif // ENABLE_USE_UNIQUE_GLCONTEXT
wxGLCanvas* get_wxglcanvas() { return m_canvas; }
bool init(bool useVBOs, bool use_legacy_opengl);
#if !ENABLE_USE_UNIQUE_GLCONTEXT
bool set_current();
#endif // !ENABLE_USE_UNIQUE_GLCONTEXT
void set_as_dirty();
@ -668,6 +674,9 @@ private:
bool _init_toolbar();
#if ENABLE_USE_UNIQUE_GLCONTEXT
bool _set_current();
#endif // ENABLE_USE_UNIQUE_GLCONTEXT
void _resize(unsigned int w, unsigned int h);
BoundingBoxf3 _max_bounding_box() const;