diff --git a/src/AppFrame.cpp b/src/AppFrame.cpp index b6cac84..84d9154 100644 --- a/src/AppFrame.cpp +++ b/src/AppFrame.cpp @@ -55,9 +55,10 @@ AppFrame::AppFrame() : wxBoxSizer *demodScopeTray = new wxBoxSizer(wxVERTICAL); wxBoxSizer *demodTunerTray = new wxBoxSizer(wxHORIZONTAL); -// int attribList[] = { WX_GL_RGBA, WX_GL_DOUBLEBUFFER, 0 }; - wxGLAttributes attribList; - attribList.PlatformDefaults().RGBA().DoubleBuffer().EndList(); + int attribList[] = { WX_GL_RGBA, WX_GL_DOUBLEBUFFER, 0 }; + //wxGLAttributes attribList; + //attribList.PlatformDefaults().RGBA().DoubleBuffer().EndList(); + //attribList.PlatformDefaults().MinRGBA(8, 8, 8, 8).DoubleBuffer().Depth(16).EndList(); mainSplitter = new wxSplitterWindow( this, wxID_MAIN_SPLITTER, wxDefaultPosition, wxDefaultSize, wxSP_3DSASH | wxSP_LIVE_UPDATE ); mainSplitter->SetSashGravity(10.0/37.0); @@ -558,7 +559,7 @@ AppFrame::AppFrame() : waterfallCanvas->setLinesPerSecond(wflps); ThemeMgr::mgr.setTheme(wxGetApp().getConfig()->getTheme()); - + Show(); #ifdef _WIN32 diff --git a/src/ui/UITestCanvas.cpp b/src/ui/UITestCanvas.cpp index e2b06cc..ba14f4a 100644 --- a/src/ui/UITestCanvas.cpp +++ b/src/ui/UITestCanvas.cpp @@ -24,7 +24,7 @@ EVT_LEAVE_WINDOW(UITestCanvas::OnMouseLeftWindow) EVT_ENTER_WINDOW(UITestCanvas::OnMouseEnterWindow) wxEND_EVENT_TABLE() -UITestCanvas::UITestCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs) : +UITestCanvas::UITestCanvas(wxWindow *parent, int *dispAttrs) : InteractiveCanvas(parent, dispAttrs) { glContext = new UITestContext(this, &wxGetApp().GetContext(this)); diff --git a/src/ui/UITestCanvas.h b/src/ui/UITestCanvas.h index a24e2fa..a75481f 100644 --- a/src/ui/UITestCanvas.h +++ b/src/ui/UITestCanvas.h @@ -14,7 +14,7 @@ class UITestCanvas: public InteractiveCanvas { public: - UITestCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs); + UITestCanvas(wxWindow *parent, int *dispAttrs); ~UITestCanvas(); private: diff --git a/src/visual/GainCanvas.cpp b/src/visual/GainCanvas.cpp index 2072b9f..6c6784f 100644 --- a/src/visual/GainCanvas.cpp +++ b/src/visual/GainCanvas.cpp @@ -24,7 +24,7 @@ EVT_LEAVE_WINDOW(GainCanvas::OnMouseLeftWindow) EVT_ENTER_WINDOW(GainCanvas::OnMouseEnterWindow) wxEND_EVENT_TABLE() -GainCanvas::GainCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs) : +GainCanvas::GainCanvas(wxWindow *parent, int *dispAttrs) : InteractiveCanvas(parent, dispAttrs) { glContext = new PrimaryGLContext(this, &wxGetApp().GetContext(this)); diff --git a/src/visual/GainCanvas.h b/src/visual/GainCanvas.h index b7729cf..f79ca38 100644 --- a/src/visual/GainCanvas.h +++ b/src/visual/GainCanvas.h @@ -27,7 +27,7 @@ public: class GainCanvas: public InteractiveCanvas { public: - GainCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs); + GainCanvas(wxWindow *parent, int *dispAttrs); ~GainCanvas(); void setHelpTip(std::string tip); diff --git a/src/visual/InteractiveCanvas.cpp b/src/visual/InteractiveCanvas.cpp index a3e2bd0..f6557a5 100644 --- a/src/visual/InteractiveCanvas.cpp +++ b/src/visual/InteractiveCanvas.cpp @@ -17,8 +17,8 @@ #include -InteractiveCanvas::InteractiveCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs) : - wxGLCanvas(parent, dispAttrs ,wxID_ANY, wxDefaultPosition, wxDefaultSize, +InteractiveCanvas::InteractiveCanvas(wxWindow *parent, int *dispAttrs) : + wxGLCanvas(parent, wxID_ANY, dispAttrs, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE), parent(parent), shiftDown(false), altDown(false), ctrlDown(false), centerFreq(0), bandwidth(0), lastBandwidth(0), isView( false) { mouseTracker.setTarget(this); diff --git a/src/visual/InteractiveCanvas.h b/src/visual/InteractiveCanvas.h index da33ebb..8ff6734 100644 --- a/src/visual/InteractiveCanvas.h +++ b/src/visual/InteractiveCanvas.h @@ -8,7 +8,7 @@ class InteractiveCanvas: public wxGLCanvas { public: - InteractiveCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs); + InteractiveCanvas(wxWindow *parent, int *dispAttrs); ~InteractiveCanvas(); long long getFrequencyAt(float x); diff --git a/src/visual/MeterCanvas.cpp b/src/visual/MeterCanvas.cpp index a93487e..4960ce8 100644 --- a/src/visual/MeterCanvas.cpp +++ b/src/visual/MeterCanvas.cpp @@ -27,7 +27,7 @@ EVT_LEAVE_WINDOW(MeterCanvas::OnMouseLeftWindow) EVT_ENTER_WINDOW(MeterCanvas::OnMouseEnterWindow) wxEND_EVENT_TABLE() -MeterCanvas::MeterCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs) : +MeterCanvas::MeterCanvas(wxWindow *parent, int *dispAttrs) : InteractiveCanvas(parent, dispAttrs), level(0), level_min(0), level_max(1), inputValue(0), userInputValue(0), showUserInput(true) { glContext = new MeterContext(this, &wxGetApp().GetContext(this)); diff --git a/src/visual/MeterCanvas.h b/src/visual/MeterCanvas.h index 56dd8ed..4b955ba 100644 --- a/src/visual/MeterCanvas.h +++ b/src/visual/MeterCanvas.h @@ -14,7 +14,7 @@ class MeterCanvas: public InteractiveCanvas { public: - MeterCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs); + MeterCanvas(wxWindow *parent, int *dispAttrs); ~MeterCanvas(); void setLevel(float level_in); diff --git a/src/visual/ModeSelectorCanvas.cpp b/src/visual/ModeSelectorCanvas.cpp index 2354d58..dcfdaa4 100644 --- a/src/visual/ModeSelectorCanvas.cpp +++ b/src/visual/ModeSelectorCanvas.cpp @@ -24,7 +24,7 @@ EVT_LEAVE_WINDOW(ModeSelectorCanvas::OnMouseLeftWindow) EVT_ENTER_WINDOW(ModeSelectorCanvas::OnMouseEnterWindow) wxEND_EVENT_TABLE() -ModeSelectorCanvas::ModeSelectorCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs) : +ModeSelectorCanvas::ModeSelectorCanvas(wxWindow *parent, int *dispAttrs) : InteractiveCanvas(parent, dispAttrs), numChoices(0), currentSelection(-1), toggleMode(false), inputChanged(false), padX(4.0), padY(4.0), highlightOverride(false) { glContext = new ModeSelectorContext(this, &wxGetApp().GetContext(this)); diff --git a/src/visual/ModeSelectorCanvas.h b/src/visual/ModeSelectorCanvas.h index 2def4d9..004dd4c 100644 --- a/src/visual/ModeSelectorCanvas.h +++ b/src/visual/ModeSelectorCanvas.h @@ -24,7 +24,7 @@ public: class ModeSelectorCanvas: public InteractiveCanvas { public: - ModeSelectorCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs); + ModeSelectorCanvas(wxWindow *parent, int *dispAttrs); ~ModeSelectorCanvas(); int getHoveredSelection(); diff --git a/src/visual/ScopeCanvas.cpp b/src/visual/ScopeCanvas.cpp index a63b276..166ac89 100644 --- a/src/visual/ScopeCanvas.cpp +++ b/src/visual/ScopeCanvas.cpp @@ -28,7 +28,7 @@ EVT_LEAVE_WINDOW(ScopeCanvas::OnMouseLeftWindow) EVT_ENTER_WINDOW(ScopeCanvas::OnMouseEnterWindow) wxEND_EVENT_TABLE() -ScopeCanvas::ScopeCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs) : InteractiveCanvas(parent, dispAttrs), ppmMode(false), ctr(0), ctrTarget(0), dragAccel(0), helpTip("") { +ScopeCanvas::ScopeCanvas(wxWindow *parent, int *dispAttrs) : InteractiveCanvas(parent, dispAttrs), ppmMode(false), ctr(0), ctrTarget(0), dragAccel(0), helpTip("") { glContext = new ScopeContext(this, &wxGetApp().GetContext(this)); inputData.set_max_num_items(2); diff --git a/src/visual/ScopeCanvas.h b/src/visual/ScopeCanvas.h index b2077cd..006f7f4 100644 --- a/src/visual/ScopeCanvas.h +++ b/src/visual/ScopeCanvas.h @@ -14,7 +14,7 @@ class ScopeCanvas: public InteractiveCanvas { public: - ScopeCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs); + ScopeCanvas(wxWindow *parent, int *dispAttrs); ~ScopeCanvas(); void setDeviceName(std::string device_name); diff --git a/src/visual/SpectrumCanvas.cpp b/src/visual/SpectrumCanvas.cpp index 6645e5d..6f7d737 100644 --- a/src/visual/SpectrumCanvas.cpp +++ b/src/visual/SpectrumCanvas.cpp @@ -29,7 +29,7 @@ EVT_RIGHT_DOWN(SpectrumCanvas::OnMouseRightDown) EVT_RIGHT_UP(SpectrumCanvas::OnMouseRightReleased) wxEND_EVENT_TABLE() -SpectrumCanvas::SpectrumCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs) : +SpectrumCanvas::SpectrumCanvas(wxWindow *parent, int *dispAttrs) : InteractiveCanvas(parent, dispAttrs), waterfallCanvas(NULL) { glContext = new PrimaryGLContext(this, &wxGetApp().GetContext(this)); diff --git a/src/visual/SpectrumCanvas.h b/src/visual/SpectrumCanvas.h index 5798c3c..85af252 100644 --- a/src/visual/SpectrumCanvas.h +++ b/src/visual/SpectrumCanvas.h @@ -13,7 +13,7 @@ class WaterfallCanvas; class SpectrumCanvas: public InteractiveCanvas { public: - SpectrumCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs); + SpectrumCanvas(wxWindow *parent, int *dispAttrs); ~SpectrumCanvas(); void attachWaterfallCanvas(WaterfallCanvas *canvas_in); diff --git a/src/visual/TuningCanvas.cpp b/src/visual/TuningCanvas.cpp index 5bd4361..260b32f 100644 --- a/src/visual/TuningCanvas.cpp +++ b/src/visual/TuningCanvas.cpp @@ -30,7 +30,7 @@ EVT_MOUSEWHEEL(TuningCanvas::OnMouseWheelMoved) //EVT_KEY_UP(TuningCanvas::OnKeyUp) wxEND_EVENT_TABLE() -TuningCanvas::TuningCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs) : +TuningCanvas::TuningCanvas(wxWindow *parent, int *dispAttrs) : InteractiveCanvas(parent, dispAttrs), dragAccum(0), uxDown(0), top(false), bottom(false), freq(-1), bw(-1), center(-1), halfBand(false) { glContext = new TuningContext(this, &wxGetApp().GetContext(this)); diff --git a/src/visual/TuningCanvas.h b/src/visual/TuningCanvas.h index 1b89c44..eae7083 100644 --- a/src/visual/TuningCanvas.h +++ b/src/visual/TuningCanvas.h @@ -17,7 +17,7 @@ public: enum ActiveState { TUNING_HOVER_NONE, TUNING_HOVER_FREQ, TUNING_HOVER_BW, TUNING_HOVER_PPM, TUNING_HOVER_CENTER }; - TuningCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs); + TuningCanvas(wxWindow *parent, int *dispAttrs); ~TuningCanvas(); void setHelpTip(std::string tip); diff --git a/src/visual/WaterfallCanvas.cpp b/src/visual/WaterfallCanvas.cpp index 3bfabe2..974f716 100644 --- a/src/visual/WaterfallCanvas.cpp +++ b/src/visual/WaterfallCanvas.cpp @@ -34,7 +34,7 @@ EVT_ENTER_WINDOW(WaterfallCanvas::OnMouseEnterWindow) EVT_MOUSEWHEEL(WaterfallCanvas::OnMouseWheelMoved) wxEND_EVENT_TABLE() -WaterfallCanvas::WaterfallCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs) : +WaterfallCanvas::WaterfallCanvas(wxWindow *parent, int *dispAttrs) : InteractiveCanvas(parent, dispAttrs), dragState(WF_DRAG_NONE), nextDragState(WF_DRAG_NONE), fft_size(0), new_fft_size(0), waterfall_lines(0), dragOfs(0), mouseZoom(1), zoom(1), freqMoving(false), freqMove(0.0), hoverAlpha(1.0) { diff --git a/src/visual/WaterfallCanvas.h b/src/visual/WaterfallCanvas.h index 8409340..038e699 100644 --- a/src/visual/WaterfallCanvas.h +++ b/src/visual/WaterfallCanvas.h @@ -18,7 +18,7 @@ public: WF_DRAG_NONE, WF_DRAG_BANDWIDTH_LEFT, WF_DRAG_BANDWIDTH_RIGHT, WF_DRAG_FREQUENCY, WF_DRAG_RANGE }; - WaterfallCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs); + WaterfallCanvas(wxWindow *parent, int *dispAttrs); void setup(unsigned int fft_size_in, int waterfall_lines_in); void setFFTSize(unsigned int fft_size_in); ~WaterfallCanvas();