← Back to team overview

kicad-developers team mailing list archive

Re: macOS 3d-viewer improvements

 

Bernhard,

Your patch set fails to build on Linux (Debian testing) with the
following build errors:

In file included from
/home/wayne/src/kicad/kicad-trunk/common/gal/hidpi_gl_canvas.cpp:27:0:
/home/wayne/src/kicad/kicad-trunk/include/gal/hidpi_gl_canvas.h:45:22:
error: ‘wxGLAttributes’ does not name a type; did you mean
‘wxVisualAttributes’?
                const wxGLAttributes& dispAttrs,
                      ^~~~~~~~~~~~~~
                      wxVisualAttributes
/home/wayne/src/kicad/kicad-trunk/common/gal/hidpi_gl_canvas.cpp:31:18:
error: ‘wxGLAttributes’ does not name a type; did you mean
‘wxVisualAttributes’?
            const wxGLAttributes& dispAttrs,
                  ^~~~~~~~~~~~~~
                  wxVisualAttributes
/home/wayne/src/kicad/kicad-trunk/common/gal/hidpi_gl_canvas.cpp: In
constructor ‘HIDPI_GL_CANVAS::HIDPI_GL_CANVAS(wxWindow*, const int&,
wxWindowID, const wxPoint&, const wxSize&, long int, const wxString&,
const wxPalette&)’:
/home/wayne/src/kicad/kicad-trunk/common/gal/hidpi_gl_canvas.cpp:38:72:
error: invalid conversion from ‘wxWindowID {aka int}’ to ‘const int*’
[-fpermissive]
     wxGLCanvas( parent, dispAttrs, id, pos, size, style, name, palette )
                                                                        ^
In file included from /usr/include/wx-3.0/wx/glcanvas.h:195:0,
                 from
/home/wayne/src/kicad/kicad-trunk/include/gal/hidpi_gl_canvas.h:30,
                 from
/home/wayne/src/kicad/kicad-trunk/common/gal/hidpi_gl_canvas.cpp:27:
/usr/include/wx-3.0/wx/gtk/glcanvas.h:23:5: note:   initializing
argument 3 of ‘wxGLCanvas::wxGLCanvas(wxWindow*, wxWindowID, const int*,
const wxPoint&, const wxSize&, long int, const wxString&, const wxPalette&)’
     wxGLCanvas(wxWindow *parent,
     ^~~~~~~~~~
common/CMakeFiles/gal.dir/build.make:422: recipe for target
'common/CMakeFiles/gal.dir/gal/hidpi_gl_canvas.cpp.o' failed
make[2]: *** [common/CMakeFiles/gal.dir/gal/hidpi_gl_canvas.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from
/home/wayne/src/kicad/kicad-trunk/include/gal/opengl/opengl_gal.h:41:0,
                 from
/home/wayne/src/kicad/kicad-trunk/common/gal/opengl/opengl_gal.cpp:29:
/home/wayne/src/kicad/kicad-trunk/include/gal/hidpi_gl_canvas.h:45:22:
error: ‘wxGLAttributes’ does not name a type; did you mean
‘wxVisualAttributes’?
                const wxGLAttributes& dispAttrs,
                      ^~~~~~~~~~~~~~
                      wxVisualAttributes
In file included from
/home/wayne/src/kicad/kicad-trunk/include/gal/opengl/opengl_gal.h:41:0,
                 from
/home/wayne/src/kicad/kicad-trunk/common/draw_panel_gal.cpp:37:
/home/wayne/src/kicad/kicad-trunk/include/gal/hidpi_gl_canvas.h:45:22:
error: ‘wxGLAttributes’ does not name a type; did you mean
‘wxVisualAttributes’?
                const wxGLAttributes& dispAttrs,
                      ^~~~~~~~~~~~~~
                      wxVisualAttributes
common/CMakeFiles/gal.dir/build.make:446: recipe for target
'common/CMakeFiles/gal.dir/gal/opengl/opengl_gal.cpp.o' failed
make[2]: *** [common/CMakeFiles/gal.dir/gal/opengl/opengl_gal.cpp.o] Error 1
common/CMakeFiles/gal.dir/build.make:86: recipe for target
'common/CMakeFiles/gal.dir/draw_panel_gal.cpp.o' failed
make[2]: *** [common/CMakeFiles/gal.dir/draw_panel_gal.cpp.o] Error 1
CMakeFiles/Makefile2:360: recipe for target
'common/CMakeFiles/gal.dir/all' failed
make[1]: *** [common/CMakeFiles/gal.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
In file included from
/home/wayne/src/kicad/kicad-trunk/common/../3d-viewer/3d_viewer/../3d_canvas/eda_3d_canvas.h:39:0,
                 from
/home/wayne/src/kicad/kicad-trunk/common/../3d-viewer/3d_viewer/eda_3d_viewer.h:37,
                 from
/home/wayne/src/kicad/kicad-trunk/pcbnew/basepcbframe.cpp:42:
/home/wayne/src/kicad/kicad-trunk/include/gal/hidpi_gl_canvas.h:45:22:
error: ‘wxGLAttributes’ does not name a type; did you mean
‘wxVisualAttributes’?
                const wxGLAttributes& dispAttrs,
                      ^~~~~~~~~~~~~~
                      wxVisualAttributes
common/CMakeFiles/pcbcommon.dir/build.make:180: recipe for target
'common/CMakeFiles/pcbcommon.dir/__/pcbnew/basepcbframe.cpp.o' failed
make[2]: ***
[common/CMakeFiles/pcbcommon.dir/__/pcbnew/basepcbframe.cpp.o] Error 1
CMakeFiles/Makefile2:400: recipe for target
'common/CMakeFiles/pcbcommon.dir/all' failed
make[1]: *** [common/CMakeFiles/pcbcommon.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2


On 12/11/2017 06:52 AM, Bernhard Stegmaier wrote:
> Hi,
> 
> Attached patches improve 3d-viewer on macOS a bit.
> 
> Patches (1)+(2) add Retina support to 3d-viewer just like it was already there for GAL canvas.
> I pulled out all the ugly #ifdef stuff into a new base class, so now all Retina related code for GAL and 3d-viewer is in one class.
> I put it into the gal folder… if you think it shouldn’t be there, please move it to a better spot or tell me where to put it.
> 
> Patch (3) is only a cleanup wrt pinch-to-zoom and enables pinch-to-zoom again when using newer wxWidgets.
> 
> Tested only on macOS, shouldn’t have any impact on other platforms.
> 
> 
> Regards,
> Bernhard
> 
> 
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 


Follow ups

References