Migration to wxWidgets v3.11:

- Seen on Windows: Bookmarkview slow update because the controls are self-reacting to the rebuild control events, so fix nullify them during control rebuilding.
- Update OpenGL initialization using v3.1 level context and canvas attributes instead of the deprecated calls.
This commit is contained in:
vsonnier
2018-03-10 08:34:39 +01:00
parent 8e52f232cf
commit e46d7f9735
36 changed files with 233 additions and 57 deletions
+2 -2
View File
@@ -27,10 +27,10 @@ EVT_LEAVE_WINDOW(UITestCanvas::OnMouseLeftWindow)
EVT_ENTER_WINDOW(UITestCanvas::OnMouseEnterWindow)
wxEND_EVENT_TABLE()
UITestCanvas::UITestCanvas(wxWindow *parent, std::vector<int> dispAttrs) :
UITestCanvas::UITestCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs) :
InteractiveCanvas(parent, dispAttrs) {
glContext = new UITestContext(this, &wxGetApp().GetContext(this));
glContext = new UITestContext(this, &wxGetApp().GetContext(this), wxGetApp().GetContextAttributes());
}
UITestCanvas::~UITestCanvas() {
+1 -1
View File
@@ -17,7 +17,7 @@
class UITestCanvas: public InteractiveCanvas {
public:
UITestCanvas(wxWindow *parent, std::vector<int> dispAttrs);
UITestCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs);
~UITestCanvas();
private:
+2 -2
View File
@@ -5,8 +5,8 @@
#include "UITestCanvas.h"
#include "ColorTheme.h"
UITestContext::UITestContext(UITestCanvas *canvas, wxGLContext *sharedContext) :
PrimaryGLContext(canvas, sharedContext), testMeter("TEST",0,100,50) {
UITestContext::UITestContext(UITestCanvas *canvas, wxGLContext *sharedContext, wxGLContextAttrs *ctxAttrs) :
PrimaryGLContext(canvas, sharedContext, ctxAttrs), testMeter("TEST",0,100,50) {
testPanel.setPosition(0.0, 0.0);
testPanel.setSize(1.0, 1.0);
+1 -1
View File
@@ -11,7 +11,7 @@ class UITestCanvas;
class UITestContext: public PrimaryGLContext {
public:
UITestContext(UITestCanvas *canvas, wxGLContext *sharedContext);
UITestContext(UITestCanvas *canvas, wxGLContext *sharedContext, wxGLContextAttrs *ctxAttrs);
void DrawBegin();
void Draw();