← Back to team overview

kicad-developers team mailing list archive

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

 

On 2/24/2016 12:43 PM, Bernhard Stegmaier wrote:
> 
>> On 24 Feb 2016, at 14:49, Wayne Stambaugh <stambaughw@xxxxxxxxx
>> <mailto:stambaughw@xxxxxxxxx>> wrote:
>>
>> 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.
> 
> This was just a quick one for current code.
> 
> If merging the new 3d stuff is planned in near future and the Retina
> support 
> should be clean, I’ll suggest to put it on hold for now.
> 
> I’ll do it the nice way when new 3d-stuff is integrated, don’t want to do it
> twice… :)

Makes sense to me.  Thanks!

> 
> 
> Regards,
> Bernhard
> 


References