# Odd viewport scaling issue on Windows

**URL:** https://discourse.libcinder.org/t/odd-viewport-scaling-issue-on-windows/1019
**Category:** Uncategorized
**Created:** [January 14, 2018, 12:30pm UTC](https://discourse.libcinder.org/t/odd-viewport-scaling-issue-on-windows/1019 "2018-01-14T12:30:32Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Andrea](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/andrea/32/193_2.png) [@Andrea](https://discourse.libcinder.org/u/Andrea)
#### Post date: [January 14, 2018, 12:30pm UTC](https://discourse.libcinder.org/t/odd-viewport-scaling-issue-on-windows/1019/1 "2018-01-14T12:30:32Z")

</div>

Hi,

I have a problem on windows, the viewport looks scaled and offset, the issue affects the drawing and the mouse events, the mouse position gets scaled and offset. I reckon this is not necessarily related to cinder, but it’s probably caused by Windows itself.

I did a quick test running the basic app drawing two squares, the orange rect should start at [5,5], but it’s drawn off-screen. The blue rect margin is wrong and the size is not square(roughly [150,160]).

any idea what could cause this? I’m running on windows 10, gtx 1050.

thanks  
Andrea

![cinderscaling](https://canada1.discourse-cdn.com/flex030/uploads/libcinder/original/1X/7ec72752b92cedd8853a16b16cf7d9f0081432d2.PNG)

---

<div class="post-metadata">

### Author: ![Kino](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/kino/32/465_2.png) [@Kino](https://discourse.libcinder.org/u/Kino)
#### Post date: [January 15, 2018, 2:55pm UTC](https://discourse.libcinder.org/t/odd-viewport-scaling-issue-on-windows/1019/2 "2018-01-15T14:55:51Z")

</div>

Could the windows scaling be the culprit here? Have a look at the PR at the end of this post:

> [@The window size I request is not used; instead, a scaled one is used](http://discourse.libcinder.org/t/the-window-size-i-request-is-not-used-instead-a-scaled-one-is-used/956):
>
> Hi. slight_smile I’m doing: setWindowSize(854, 480); in setup(). But when I screenshot my app and measure the window in the screenshot, it’s 1068x600px. Coincidentally, that’s exactly how big the youtube player is in a maximized browser window on my PC. Return values I’m getting: getWindowWidth() -\> 854. getWindowContentScale() -\> 1 isHighDensityDisplayEnabled() -\> false My display resolution is 1920x1080 and I’m on Windows 10. Any idea what’s going on?

---

<div class="post-metadata">

### Author: ![Andrea](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/andrea/32/193_2.png) [@Andrea](https://discourse.libcinder.org/u/Andrea)
#### Post date: [January 15, 2018, 10:31pm UTC](https://discourse.libcinder.org/t/odd-viewport-scaling-issue-on-windows/1019/3 "2018-01-15T22:31:33Z")

</div>

I’ve already tried that, it didn’t work for me.
