# Window resolution with highDensityDisplay

**URL:** <https://discourse.libcinder.org/t/window-resolution-with-highdensitydisplay/1233>\
**Category:** Using Cinder\
**Created:** [August 1, 2018, 6:40pm UTC](https://discourse.libcinder.org/t/window-resolution-with-highdensitydisplay/1233 "2018-08-01T18:40:06Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![couleurs](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/couleurs/32/99_2.png) [@couleurs](https://discourse.libcinder.org/u/couleurs)\
**Post date:** [August 1, 2018, 6:40pm UTC](https://discourse.libcinder.org/t/window-resolution-with-highdensitydisplay/1233/1 "2018-08-01T18:40:06Z")

</div>

Hello 🙂

I’m working on a Macbook Pro with Retina display (15-inch, 2017). According to the “About” section, the display has a 2880 x 1800 resolution.

My Cinder app explicitly sets its main window to be 1000 x 1000, but whether or not I call `setHighDensityDisplayEnabled()` the window takes most of my screen space, and when I save a screenshot using `copyWindowSurface()` it seems the result is always 1000 x 1000, where I was expecting something double, or at least higher. I read this article to try and get more clarity but I remain a little confused:  
[https://forum.libcinder.org/topic/rfc-retina-high-density-display-support](https://forum.libcinder.org/topic/rfc-retina-high-density-display-support)

Am I missing something?

Thanks a lot for your help!  
Johan

---

<div class="post-metadata">

**Author:** ![lithium](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/lithium/32/38_2.png) [@lithium](https://discourse.libcinder.org/u/lithium)\
**Post date:** [August 1, 2018, 11:49pm UTC](https://discourse.libcinder.org/t/window-resolution-with-highdensitydisplay/1233/2 "2018-08-01T23:49:57Z")

</div>

Have a squizz at [this](https://discourse.libcinder.org/t/the-window-size-i-request-is-not-used-instead-a-scaled-one-is-used/956/4?u=lithium.snepo)

---

<div class="post-metadata">

**Author:** ![seph](https://avatars.discourse-cdn.com/v4/letter/s/87869e/32.png) [@seph](https://discourse.libcinder.org/u/seph)\
**Post date:** [August 2, 2018, 8:55am UTC](https://discourse.libcinder.org/t/window-resolution-with-highdensitydisplay/1233/3 "2018-08-02T08:55:06Z")

</div>

I think when you set window size you are dealing with points instead of pixels.

So say if you do `settings->setWindowSize(500,500)` and you have high density enabled,  
then when you get window size using `toPixels(getWindowWidth())` you will get 1000.

---

<div class="post-metadata">

**Author:** ![couleurs](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/couleurs/32/99_2.png) [@couleurs](https://discourse.libcinder.org/u/couleurs)\
**Post date:** [August 3, 2018, 4:23pm UTC](https://discourse.libcinder.org/t/window-resolution-with-highdensitydisplay/1233/4 "2018-08-03T16:23:30Z")

</div>

Thanks for your answers which helped me understand different parts of the problem.

It turns out that even though the “About” section says the resolution of the display is 2880 x 1800, the actual resolution is much less to make things actually visible and usable. There is a scale that can be set in System Preferences \> Display.

---

<div class="post-metadata">

**Author:** ![couleurs](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/couleurs/32/99_2.png) [@couleurs](https://discourse.libcinder.org/u/couleurs)\
**Post date:** [August 3, 2018, 6:44pm UTC](https://discourse.libcinder.org/t/window-resolution-with-highdensitydisplay/1233/5 "2018-08-03T18:44:08Z")

</div>

New follow-up. @seph I had tried what you suggested before when building the app with CMake in VSCode and it didn’t work. However, trying now in Xcode it all works as expected. With further logging I realize that even when specifying `settings->setHighDensityDisplayEnabled()`, the function `getContentScale()` still returns 1 with CMake, whereas it returns 2 when building and launching from Xcode.

Any idea what this could come from? Maybe it’s something with my CMake build script?

---

<div class="post-metadata">

**Author:** ![couleurs](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/couleurs/32/99_2.png) [@couleurs](https://discourse.libcinder.org/u/couleurs)\
**Post date:** [August 3, 2018, 9:16pm UTC](https://discourse.libcinder.org/t/window-resolution-with-highdensitydisplay/1233/6 "2018-08-03T21:16:46Z")

</div>

Continuing this discussion about high-density display here for those interested:

> [@Cinder with Visual Studio Code + CMake on Mac](https://discourse.libcinder.org/t/cinder-with-visual-studio-code-on-mac/1231):
>
> Hello, I have a colleague who was telling me he was successfully using Code as an IDE for openFrameworks on Mac. According to him, you just need to have a Makefile to be able to build and run from Code directly. I am getting a little tired of XCode and was wondering if it would be possible to switch to Code when working on Cinder. Curious if anyone got that setup working. There was a similar question on the forum from 2016 but wondering if something changes in the past two years. Thanks!
