← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] OS X: Add Retina support to 3d-viewer

 


Hi Mario,

On 2016-02-24 10:01, Mário Luzeiro wrote:
In relation to 3D-Viewer (the actual stable and my/cirilo development)
the windows size comes from wxWidgets... maybe in different places..
I don't know about the GAL, but  in this case, I would suggest if you
could think in some kind of general function that can be used in
different places.
That function will abstract that OS X condition to get the windows
size.. so we will not spread OS #ifdefs on the source

It is only needed with a wxGLCanvas.
So, currently there are only 3 spots... one in GAL canvas and two in 3d-viewer (one where the viewport is set and the other where the shadows are computed).

I don't how many of them will come with the new 3d-viewer (in how many spots do you need the window size).
And, I don't know if there is a nice spot to do this in one place.
It also depends how finally wxWidgets will handle that.
I think it doesn't make sense to try to integrate the current patched version as nice as possible when final wxWidgets solution will probably be different.

But, I'll check of course.

From a first guess subclassing wxGLCanvas and providing an own getSize() there could be the most clean solution for that. I don't know if we really want to do that for above reason to maybe only save one #ifdef (as much as I also do not like #ifdefs).


Regards,
Bernhard


Follow ups

References