kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #23336
Re: [PATCH] OS X: Add Retina support to 3d-viewer
-
To:
Cirilo Bernardo <cirilo.bernardo@xxxxxxxxx>, Bernhard Stegmaier <stegmaier@xxxxxxxxxxxxx>
-
From:
Mário Luzeiro <mrluzeiro@xxxxx>
-
Date:
Tue, 23 Feb 2016 22:57:08 +0000
-
Accept-language:
en-GB, en-US
-
Authentication-results:
gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=ua.pt;
-
Cc:
KiCad Developers <kicad-developers@xxxxxxxxxxxxxxxxxxx>
-
In-reply-to:
<CAHBNN+Pu80FAiZYft5=AXWOY93T6rvq0AP=FX1wo4YOPdQkYdQ@mail.gmail.com>
-
Spamdiagnosticmetadata:
NSPM
-
Spamdiagnosticoutput:
1:23
-
Thread-index:
AQHRZpkKhetlfNXeXEOsMl8z9FFbvp80716AgAVZkACAAAOW8Q==
-
Thread-topic:
[Kicad-developers] [PATCH] OS X: Add Retina support to 3d-viewer
Hi Bernhard,
- glViewport( 0, 0, size.x, size.y );
+#ifdef RETINA_OPENGL_PATCH
+ const float scale_factor = GetBackingScaleFactor();
+#else
+ const float scale_factor = 1.0f;
+#endif
+ glViewport( 0, 0, size.x * scale_factor, size.y * scale_factor );
I dont know nothing about that feature of OS X world, but.. as far as I understand it is all related with the number of DPIs.. and then.. screen resolution..
Why the OS X does not just report a screen/window with the real resolution?
oks.. I guess that is some OS war discussion :)
anyway..
maybe you would like to add some comments / clarify in the source code near that special functionalities:
+#ifdef RETINA_OPENGL_PATCH
+ SetViewWantsBestResolution( true );
+#endif
so you will explain or link to some place that explain the use of that function?
Mario
________________________________________
From: Kicad-developers [kicad-developers-bounces+mrluzeiro=ua.pt@xxxxxxxxxxxxxxxxxxx] on behalf of Cirilo Bernardo [cirilo.bernardo@xxxxxxxxx]
Sent: 23 February 2016 22:39
To: Bernhard Stegmaier
Cc: KiCad Developers
Subject: Re: [Kicad-developers] [PATCH] OS X: Add Retina support to 3d-viewer
I have no objection as such, but keep a copy of the patch. With the various 3D changes in progress you may need to apply the patch yet again to other code in the future.
- Cirilo
On Sat, Feb 20, 2016 at 11:57 PM, Bernhard Stegmaier <stegmaier@xxxxxxxxxxxxx<mailto:stegmaier@xxxxxxxxxxxxx>> wrote:
Any objections on this one?
> On 13.02.2016, at 20:38, Bernhard Stegmaier <stegmaier@xxxxxxxxxxxxx<mailto:stegmaier@xxxxxxxxxxxxx>> wrote:
>
> Hi,
>
> attached a patch to add Retina support to 3d-viewer on OS X.
> It is done similar to OpenGL canvas (and, of course, also requires a patched wxWidgets).
>
>
> Regards,
> Bernhard
>
> <osx-3d-retina.patch>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx<mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help : https://help.launchpad.net/ListHelp
_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx<mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
Unsubscribe : https://launchpad.net/~kicad-developers
More help : https://help.launchpad.net/ListHelp
Follow ups
References