On 2/24/2016 4:39 AM, Bernhard Stegmaier wrote: > > 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.
Either subclass wxGLCanvas or create a stand alone global function (either as a static function of some logical class or a stand alone function) to avoid having three copies of the exact same code. This makes maintaining this code much easier. > 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 > > _______________________________________________ > Mailing list: https://launchpad.net/~kicad-developers > Post to : [email protected] > Unsubscribe : https://launchpad.net/~kicad-developers > More help : https://help.launchpad.net/ListHelp _______________________________________________ Mailing list: https://launchpad.net/~kicad-developers Post to : [email protected] Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp

