[osg-users] Viewport screen resolution not scaling properly in OSX retina

OpenSceneGraph Users osg-users at lists.openscenegraph.org
Thu Mar 12 08:24:11 PDT 2020


Robert is right, windowing toolkits often have their own ways of handling
this. For example, Qt and FLTK (and others) define a pixel ratio that you
can get via their API. I did a google search for "fltk gui retina" which
took me to https://www.fltk.org/doc-1.4/drawing.html . See that link for
getting the screen scale factor, which you then apply anywhere you use
pixel size/coordinates in your program. The resulting code code is
cross-platform, since the pixel scale will be 1.0 for Win/Linux but
something higher on OSX.

Ravi

On Thu, Mar 12, 2020 at 4:24 AM OpenSceneGraph Users <
osg-users at lists.openscenegraph.org> wrote:

> I don't have an MacOS/OSX box or expertise on it but I do know that the
> OSG's built in osgViewer windowing functionality for the Mac does have
> handling for it.  If you are using a 3rd party library like FLTK or GLFW
> then it'll likely bypass this.
>
> Does osgviewer work OK for you?  Have you tried just using the OSG's
> native windowing?
>
> --
> You received this message because you are subscribed to the Google Groups
> "OpenSceneGraph Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to osg-users+unsubscribe at googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/osg-users/de7c0c0e-37ff-42a2-941d-425661e9cbb6%40googlegroups.com
> <https://groups.google.com/d/msgid/osg-users/de7c0c0e-37ff-42a2-941d-425661e9cbb6%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20200312/08951f97/attachment.html>


More information about the osg-users mailing list