diff options
author | Steve Wills <swills@FreeBSD.org> | 2018-12-04 17:46:22 +0000 |
---|---|---|
committer | Steve Wills <swills@FreeBSD.org> | 2018-12-04 17:46:22 +0000 |
commit | e4f8fefbea8731b47c70cca7e0e9b6ac9cb0f2e4 (patch) | |
tree | 52a8e4b367f7255a75ff0524d806b30bad60da27 /graphics/panoglview | |
parent | a075fd6aa41554698fb4dd5872f0967c1078952d (diff) | |
download | ports-e4f8fefbea8731b47c70cca7e0e9b6ac9cb0f2e4.tar.gz ports-e4f8fefbea8731b47c70cca7e0e9b6ac9cb0f2e4.zip |
Notes
Diffstat (limited to 'graphics/panoglview')
-rw-r--r-- | graphics/panoglview/Makefile | 2 | ||||
-rw-r--r-- | graphics/panoglview/files/patch-src_panocanvas.cpp | 98 | ||||
-rw-r--r-- | graphics/panoglview/files/patch-src_panocanvas.h | 24 | ||||
-rw-r--r-- | graphics/panoglview/files/patch-src_panoframe.cpp | 47 | ||||
-rw-r--r-- | graphics/panoglview/files/patch-src_panointeractivecanvas.cpp | 60 | ||||
-rw-r--r-- | graphics/panoglview/files/patch-src_panointeractivecanvas.h | 14 | ||||
-rw-r--r-- | graphics/panoglview/files/patch-src_smallicon.xpm | 9 |
7 files changed, 253 insertions, 1 deletions
diff --git a/graphics/panoglview/Makefile b/graphics/panoglview/Makefile index 2c576aff7ffa..d58dce0be53d 100644 --- a/graphics/panoglview/Makefile +++ b/graphics/panoglview/Makefile @@ -20,7 +20,7 @@ CFLAGS+= -I${LOCALBASE}/include CXXFLAGS+= -I${LOCALBASE}/include -ftemplate-depth-64 LIBS+= -L${LOCALBASE}/lib -lGLU -lGL -USE_WX= 2.8 +USE_WX= 2.8 3.0 WX_COMPS= wx WX_CONF_ARGS= relative diff --git a/graphics/panoglview/files/patch-src_panocanvas.cpp b/graphics/panoglview/files/patch-src_panocanvas.cpp new file mode 100644 index 000000000000..43f264b10420 --- /dev/null +++ b/graphics/panoglview/files/patch-src_panocanvas.cpp @@ -0,0 +1,98 @@ +--- src/panocanvas.cpp.orig 2008-07-23 21:09:12 UTC ++++ src/panocanvas.cpp +@@ -41,12 +41,20 @@ + + BEGIN_EVENT_TABLE(panoCanvas, wxGLCanvas) + EVT_PAINT(panoCanvas::OnPaint) ++#if wxCHECK_VERSION(3,0,0) ++ EVT_SIZE (panoCanvas::resized) ++#else //wxCHECK_VERSION(3,0,0) + EVT_SIZE (panoCanvas::OnSize) ++#endif //wxCHECK_VERSION(3,0,0) + EVT_ERASE_BACKGROUND(panoCanvas::OnEraseBackground) + END_EVENT_TABLE() + + panoCanvas::panoCanvas(wxWindow *parent, int id, const wxPoint &position, const wxSize &size) : ++#if wxCHECK_VERSION(3,0,0) ++wxGLCanvas(parent,id,0,position,size), ++#else //wxCHECK_VERSION(3,0,0) + wxGLCanvas(parent,id,position,size), ++#endif //wxCHECK_VERSION(3,0,0) + m_position(0.0,0.0,50.0), + m_aspectratio(size.GetWidth()/(double) size.GetHeight()), + m_initialized(false), +@@ -56,6 +64,9 @@ m_currentboundaries(CPanRange (-m_position.getFov()*m + CAngleRange( -m_position.getFov() / 2.0, m_position.getFov() / 2.0), + CAngleRange( 0.0, 180.0 )), + m_imageboundaries(CPanRange(-180.0,180.0),CAngleRange(-90.0,90.0),CAngleRange(0.0,180.0)), ++#if wxCHECK_VERSION(3,0,0) ++m_context(new wxGLContext(this)), ++#endif //wxCHECK_VERSION(3,0,0) + m_divisions(128) + { + for(int i=0;i<16;++i) +@@ -68,24 +79,40 @@ panoCanvas::~panoCanvas() + { + if(m_hasimage) + deletePanorama(); ++#if wxCHECK_VERSION(3,0,0) ++ delete m_context; ++#endif //wxCHECK_VERSION(3,0,0) + } + + void panoCanvas::OnEraseBackground(wxEraseEvent& event) + { + } + ++#if wxCHECK_VERSION(3,0,0) ++void panoCanvas::resized(wxSizeEvent &event) ++#else //wxCHECK_VERSION(3,0,0) + void panoCanvas::OnSize(wxSizeEvent &event) ++#endif //wxCHECK_VERSION(3,0,0) + { ++#if !wxCHECK_VERSION(3,0,0) + wxGLCanvas::OnSize(event); ++#endif //!wxCHECK_VERSION(3,0,0) + + int w,h; + GetClientSize(&w,&h); ++#if wxCHECK_VERSION(3,0,0) ++ if (GetXWindow()) SetCurrent(*m_context); ++#else //wxCHECK_VERSION(3,0,0) + SetCurrent(); ++#endif //wxCHECK_VERSION(3,0,0) + + + glViewport(0,0,(GLint) w, (GLint) h); + m_aspectratio = (GLdouble) w/(GLdouble) h; + m_winsize = wxSize(w,h); ++#if wxCHECK_VERSION(3,0,0) ++ Refresh(); ++#endif //wxCHECK_VERSION(3,0,0) + } + + void panoCanvas::OnPaint(wxPaintEvent &event) +@@ -93,7 +120,11 @@ void panoCanvas::OnPaint(wxPaintEvent &event) + /* must always be here */ + wxPaintDC dc(this); + ++#if wxCHECK_VERSION(3,0,0) ++ SetCurrent(*m_context); ++#else //wxCHECK_VERSION(3,0,0) + SetCurrent(); ++#endif //wxCHECK_VERSION(3,0,0) + + if(!m_initialized){ + initGL(); +@@ -125,7 +156,11 @@ void panoCanvas::position() + + void panoCanvas::deletePanorama() + { ++#if wxCHECK_VERSION(3,0,0) ++ SetCurrent(*m_context); ++#else //wxCHECK_VERSION(3,0,0) + SetCurrent(); ++#endif //wxCHECK_VERSION(3,0,0) + glDeleteTextures(m_numOfTexPatches.x*m_numOfTexPatches.y,m_textures); + m_hasimage = false; + delete [] m_viewableTexPatches; diff --git a/graphics/panoglview/files/patch-src_panocanvas.h b/graphics/panoglview/files/patch-src_panocanvas.h new file mode 100644 index 000000000000..af4bda3ffbd5 --- /dev/null +++ b/graphics/panoglview/files/patch-src_panocanvas.h @@ -0,0 +1,24 @@ +--- src/panocanvas.h.orig 2008-07-23 21:09:11 UTC ++++ src/panocanvas.h +@@ -148,7 +148,11 @@ class panoCanvas : public wxGLCanvas { (public) + panoCanvas(wxWindow *parent, int id, const wxPoint &position=wxDefaultPosition, const wxSize &size=wxDefaultSize); + virtual ~panoCanvas(); + void OnPaint(wxPaintEvent &event); ++#if wxCHECK_VERSION(3,0,0) ++ void resized(wxSizeEvent &event); ++#else //wxCHECK_VERSION(3,0,0) + void OnSize(wxSizeEvent &event); ++#endif //wxCHECK_VERSION(3,0,0) + void OnEraseBackground(wxEraseEvent& event); + + CBoundaries calculateViewBoundaries(const CPosition &offset = CPosition()); +@@ -198,6 +202,9 @@ class panoCanvas : public wxGLCanvas { (public) + CBoundaries m_currentboundaries; + CBoundaries m_imageboundaries; + bool m_initialized; ++#if wxCHECK_VERSION(3,0,0) ++ wxGLContext *m_context; ++#endif //wxCHECK_VERSION(3,0,0) + DECLARE_EVENT_TABLE(); + }; + diff --git a/graphics/panoglview/files/patch-src_panoframe.cpp b/graphics/panoglview/files/patch-src_panoframe.cpp new file mode 100644 index 000000000000..6d716a4bd314 --- /dev/null +++ b/graphics/panoglview/files/patch-src_panoframe.cpp @@ -0,0 +1,47 @@ +--- src/panoframe.cpp.orig 2008-07-23 21:09:11 UTC ++++ src/panoframe.cpp +@@ -136,7 +136,13 @@ PCX files (*.pcx)|*.pcx|\ + PNM files (*.pnm)|*.pnm|\ + TIFF files (*.tif)|*.tif|\ + XPM files (*.xpm)|*.xpm|\ +-All files (*.*)|*.*"),wxOPEN|wxFILE_MUST_EXIST); ++All files (*.*)|*.*"), ++#if wxCHECK_VERSION(3,0,0) ++ wxFD_OPEN|wxFD_FILE_MUST_EXIST ++#else //wxCHECK_VERSION(3,0,0) ++ wxOPEN|wxFILE_MUST_EXIST ++#endif //wxCHECK_VERSION(3,0,0) ++ ); + if (imagename !=wxT("")) + openImage(imagename); + } +@@ -153,7 +159,13 @@ void panoFrame::OnFullScreen(wxCommandEvent &event) + + void panoFrame::OnOpenProject(wxCommandEvent &event) + { +- wxString filename = wxFileSelector(_("Open Project"),wxEmptyString,wxEmptyString,wxT("paf"),_("Panorama files (*.paf)|*.paf|All files (*.*)|*.*"),wxOPEN|wxFILE_MUST_EXIST); ++ wxString filename = wxFileSelector(_("Open Project"),wxEmptyString,wxEmptyString,wxT("paf"),_("Panorama files (*.paf)|*.paf|All files (*.*)|*.*"), ++#if wxCHECK_VERSION(3,0,0) ++ wxFD_OPEN|wxFD_FILE_MUST_EXIST ++#else //wxCHECK_VERSION(3,0,0) ++ wxOPEN|wxFILE_MUST_EXIST ++#endif //wxCHECK_VERSION(3,0,0) ++ ); + if (filename !=wxT("")){ + openProject(filename); + } +@@ -292,7 +304,13 @@ void panoFrame::openArgumentFile(const wxString &filen + + void panoFrame::OnSaveProject(wxCommandEvent &event) + { +- wxString filename = wxFileSelector(_("Save Project"),wxEmptyString,wxEmptyString,wxT("paf"),_("Panorama files (*.paf)|*.paf|All files (*.*)|*.*"),wxOVERWRITE_PROMPT|wxSAVE); ++ wxString filename = wxFileSelector(_("Save Project"),wxEmptyString,wxEmptyString,wxT("paf"),_("Panorama files (*.paf)|*.paf|All files (*.*)|*.*"), ++#if wxCHECK_VERSION(3,0,0) ++ wxFD_OPEN|wxFD_FILE_MUST_EXIST ++#else //wxCHECK_VERSION(3,0,0) ++ wxOPEN|wxFILE_MUST_EXIST ++#endif //wxCHECK_VERSION(3,0,0) ++ ); + if (filename != wxT("")){ + if (wxFileExists(filename)) + wxRemoveFile(filename); diff --git a/graphics/panoglview/files/patch-src_panointeractivecanvas.cpp b/graphics/panoglview/files/patch-src_panointeractivecanvas.cpp new file mode 100644 index 000000000000..92b914685e74 --- /dev/null +++ b/graphics/panoglview/files/patch-src_panointeractivecanvas.cpp @@ -0,0 +1,60 @@ +--- src/panointeractivecanvas.cpp.orig 2008-07-23 21:09:12 UTC ++++ src/panointeractivecanvas.cpp +@@ -62,7 +62,11 @@ BEGIN_EVENT_TABLE(panoInteractiveCanvas, panoCanvas) + EVT_KEY_DOWN (panoInteractiveCanvas::OnKeyDown ) + EVT_KEY_UP (panoInteractiveCanvas::OnKeyUp ) + EVT_PAINT (panoInteractiveCanvas::OnPaint ) ++#if wxCHECK_VERSION(3,0,0) ++ EVT_SIZE (panoInteractiveCanvas::resized ) ++#else //wxCHECK_VERSION(3,0,0) + EVT_SIZE (panoInteractiveCanvas::OnSize ) ++#endif //wxCHECK_VERSION(3,0,0) + END_EVENT_TABLE() + + panoInteractiveCanvas::panoInteractiveCanvas(wxWindow* parent, int id, const wxPoint& position, const wxSize& size): +@@ -96,13 +100,23 @@ panoInteractiveCanvas::~panoInteractiveCanvas() + { + } + ++#if wxCHECK_VERSION(3,0,0) ++void panoInteractiveCanvas::resized(wxSizeEvent &event) ++#else //wxCHECK_VERSION(3,0,0) + void panoInteractiveCanvas::OnSize(wxSizeEvent &event) ++#endif //wxCHECK_VERSION(3,0,0) + { ++#if !wxCHECK_VERSION(3,0,0) + wxGLCanvas::OnSize(event); ++#endif //!wxCHECK_VERSION(3,0,0) + + int w,h; + GetClientSize(&w,&h); ++#if wxCHECK_VERSION(3,0,0) ++ if (GetXWindow()) SetCurrent(*m_context); ++#else //wxCHECK_VERSION(3,0,0) + SetCurrent(); ++#endif //wxCHECK_VERSION(3,0,0) + + // TODO: opengl needs to be initialized here. + if(m_initialized){ +@@ -121,6 +135,9 @@ void panoInteractiveCanvas::OnSize(wxSizeEvent &event) + + m_aspectratio = (GLdouble) w/(GLdouble) h; + m_winsize = wxSize(w,h); ++#if wxCHECK_VERSION(3,0,0) ++ Refresh(); ++#endif //wxCHECK_VERSION(3,0,0) + } + + void panoInteractiveCanvas::OnPaint(wxPaintEvent &event) +@@ -128,7 +145,11 @@ void panoInteractiveCanvas::OnPaint(wxPaintEvent &even + /* must always be here */ + wxPaintDC dc(this); + ++#if wxCHECK_VERSION(3,0,0) ++ SetCurrent(*m_context); ++#else //wxCHECK_VERSION(3,0,0) + SetCurrent(); ++#endif //wxCHECK_VERSION(3,0,0) + + if(!m_initialized){ + initGL(); diff --git a/graphics/panoglview/files/patch-src_panointeractivecanvas.h b/graphics/panoglview/files/patch-src_panointeractivecanvas.h new file mode 100644 index 000000000000..98c4153a4a4b --- /dev/null +++ b/graphics/panoglview/files/patch-src_panointeractivecanvas.h @@ -0,0 +1,14 @@ +--- src/panointeractivecanvas.h.orig 2008-07-23 21:09:11 UTC ++++ src/panointeractivecanvas.h +@@ -39,7 +39,11 @@ class panoInteractiveCanvas : public panoCanvas (publi + void OnMouse(wxMouseEvent& event); + void OnTimer(wxTimerEvent &event); + void OnPaint(wxPaintEvent &event); ++#if wxCHECK_VERSION(3,0,0) ++ void resized(wxSizeEvent &event); ++#else //wxCHECK_VERSION(3,0,0) + void OnSize(wxSizeEvent &event); ++#endif //wxCHECK_VERSION(3,0,0) + void setBoundaryMode(int boundarymode); + void enableShowBoundaries(bool show); + void enableUseBoundaries(bool use); diff --git a/graphics/panoglview/files/patch-src_smallicon.xpm b/graphics/panoglview/files/patch-src_smallicon.xpm new file mode 100644 index 000000000000..c8c27c39da94 --- /dev/null +++ b/graphics/panoglview/files/patch-src_smallicon.xpm @@ -0,0 +1,9 @@ +--- src/smallicon.xpm.orig 2008-07-23 21:09:10 UTC ++++ src/smallicon.xpm +@@ -1,5 +1,5 @@ + /* XPM */ +-static char *smallicon[]={ ++static char const *smallicon[]={ + "16 16 9 1", + ". c None", + "# c #0058c0", |