diff --git a/3Depict-0.0.4-gl-startup.patch b/3Depict-0.0.4-gl-startup.patch new file mode 100644 index 0000000..bf81202 --- /dev/null +++ b/3Depict-0.0.4-gl-startup.patch @@ -0,0 +1,79 @@ +diff -r 50a287e4484b src/3Depict.cpp +--- src/3Depict.cpp Mon Mar 07 01:33:27 2011 +0000 ++++ src/3Depict.cpp Sun Mar 13 00:53:01 2011 +0000 +@@ -281,7 +281,7 @@ + MainWindowFrame::MainWindowFrame(wxWindow* parent, int id, const wxString& title, const wxPoint& pos, const wxSize& size, long style): + wxFrame(parent, id, title, pos, size, style) + { +- ++ initedOK=false; + programmaticEvent=false; + fullscreenState=0; + //Set up the program icon handler +@@ -324,6 +324,14 @@ + splitterSpectra = new wxSplitterWindow(noteDataView, ID_SPLIT_SPECTRA, wxDefaultPosition, wxDefaultSize, wxSP_3D|wxSP_BORDER); + window_2_pane_2 = new wxPanel(splitterSpectra, wxID_ANY); + panelTop = new BasicGLPane(splitTopBottom); ++ ++ //I had to work this out by studying the construtor ++ if(!panelTop->m_glContext) ++ { ++ cerr << "Unable to initialise the openGL panel. Program cannot start. Please check your video drivers." << endl; ++ return; ++ } ++ + panelLeft = new wxPanel(splitLeftRight, wxID_ANY); + notebookControl = new wxNotebook(panelLeft, ID_NOTEBOOK_CONTROL, wxDefaultPosition, wxDefaultSize, wxNB_RIGHT); + noteTools = new wxPanel(notebookControl, ID_NOTE_PERFORMANCE, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL); +@@ -661,7 +669,7 @@ + delete paths; + //----------------- + +- ++ initedOK=true; + + + updateTimer->Start(UPDATE_TIMER_DELAY,wxTIMER_CONTINUOUS); +@@ -4208,7 +4216,7 @@ + { + + //Register signal handler for backtraces +- if (!wxApp::OnInit()) ++ if (!wxApp::OnInit()) + return false; + + //Need to seed random number generator for entire program +@@ -4220,6 +4228,10 @@ + + wxInitAllImageHandlers(); + MainFrame = new MainWindowFrame(NULL, wxID_ANY, wxEmptyString); ++ ++ if(!MainFrame->initOK()) ++ return false; ++ + SetTopWindow(MainFrame); + + #ifdef DEBUG +diff -r 50a287e4484b src/3Depict.h +--- src/3Depict.h Mon Mar 07 01:33:27 2011 +0000 ++++ src/3Depict.h Sun Mar 13 00:53:01 2011 +0000 +@@ -108,6 +108,8 @@ + + //!Current fullscreen status + unsigned int fullscreenState; ++ ++ bool initedOK; + protected: + wxTimer *statusTimer; + wxTimer *progressTimer; +@@ -301,6 +303,10 @@ + + virtual void SetCommandLineFiles(wxArrayString &files); + virtual void updateLastRefreshBox(); ++ ++ ++ bool initOK() const {return initedOK;} ++ + }; // wxGlade: end class + + diff --git a/3Depict.spec b/3Depict.spec index 5f1664a..0e74639 100644 --- a/3Depict.spec +++ b/3Depict.spec @@ -1,6 +1,6 @@ Name: 3Depict Version: 0.0.4 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Valued 3D point cloud visualization and analysis Group: Applications/Engineering @@ -13,6 +13,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) #Fedora specific texture path install location Patch0: %{name}-%{version}-texture-path.patch +#Fix bug for opengl startup crash on initalisiation fail +Patch1: %{name}-%{version}-gl-startup.patch #Mathgl for plotting BuildRequires: mathgl-devel @@ -44,6 +46,7 @@ useful for general scalar valued point data purposes. %prep %setup -q %patch0 +%patch1 %build #--enable-openmp-parallel does not work -- there is a bug in the @@ -97,6 +100,9 @@ rm -rf %{buildroot} %changelog +* Sat Mar 13 2011 D Haley - 0.0.4-4 +- Patch opengl startup code -- peek at gl context. Possible fix for bug 684390 + * Sat Feb 12 2011 D Haley - 0.0.4-3 - Fix bug 677016