What happens when you connect non-retina display to MBP with retina? - macos

AFAIK Mac OSX has unified screen space. So it's unclear to me what happens when you have multiple displays with different backing scale factor. Will retina display go into low-res mode (so -[NSScreen backingScaleFactor] returns the lowest value among all attached displays)? If no, how an app will be rendered if it's placed so part of it appears on display with retina and another part appears on display without retina?

I'm working with some HiDPI issues at the moment, and I have my not retina MBP and thunder display with turned on HiDPI mode on it.
On connected display, it has 2.0 backing scale factor, and when I drag the window to MBP display (which has usual DPI), next is happening:
When the major part of window is on HiDPI, it renders all the window with backing scale factor 2.0.
When the major part moves to non HiDPI display, it rerenders all graphics with backing scale factor equal 1.0, and shows new rendered window on both displays.
Hope it will help you)
EDIT: screenshots added.
Screenshots near the displays border (Usual on the Left, Retina on the Right):
backingScalefactor 1.0:
https://dl.dropbox.com/u/51547223/Backing1.0.png
backingScalefactor 2.0:
https://dl.dropbox.com/u/51547223/Backing2.0.png

Related

Force a retina iPad to use non-retina images

I'm creating an app using OpenGL...
I have a retina iPad, and I'm using a texture that stores #2x images. When my app starts up, the OpenGL framebuffer is created and querying the size of it comes back as 1536x2048 - so far so good.
I also have a texture for non-retina iPad display (768x1024), but I do not have a non-retina iPad. I'd like to force my retina iPad to use the non-retina graphics (i.e, for it to use scale == 1.0). So I'd like it to create a 768x1024 OpenGL framebuffer. The problem is that it always creates a 1536x2048 frame buffer, and scale is always 2.0.
Is there a way of forcing it to use a scale of 1.0, and creating a smaller framebuffer? The base iOS version for the app is 8.0, but since iOS8.0 still works on the iPad2, I'd like to test that resolution as well.
I've tried using UILaunchImages, but that doesn't seem to work? In the past, when an app was written for a non-retina screen, a retina device used to scale the lower resolution to fit the higher-resolution screen, and that's what I want - at least so I can test....
Is UILaunchImages the right way to go to try and get iOS to think that only low-res graphics are available?
IIRC, simply by having an #2x resource (splash, icon, etc..) used to signal iOS that you are running an app with support for Retina. I think since then Apple has added a NSHighResolutionCapable key that you can try to set false in the plist. So try removing all #2x resources from your build and setting that key to false.
Another approach is to change your glViewPort and/or the Projection matrix to scale your logical resolution to 1024x768. I have the opposite problem in that I need to scale non-retina images up to the retina backing scale. I use a Scaling matrix in my stack to fix this.
Ask me how I mix and match retina and non-retina images!

VS2010 Form being cropped at run time on Laptop

Hi I have developed a VS2010 application in Windows 7. I am also using InstallShield Premier to create an Setup.exe/MSI as usual.
The problem is that my splash screen is being cropped on the right hand side when I install on to a laptop which has a screen resolution of 1366 x 768.
(On a desktop of 1900 x 1080 it is fine, both the forms are visible).
My main form is of size 1330 x 848 and appears ok albeit snug.
The Splash screen form is only of size 562 x 398 so this should in theory fit well easy but this form is being cropped by say 25% on the right. So only 75% of the Splash screen is visible missing out the "Skip" button on the right.
This form does have a progress bar using a timer and a centre logo, can't think why this would have any bearing.
I am aware if the Form Autuosize attribute, Autuosize to True and have tried looking in the Installshield parameters to no avail.
I have recently added a background (and stretch to fill) to both Forms which may have some bearing on the matter but doubt it.
Any help would be greatly appreciated,
Thanks in advance.
have you set your splash screen form startposition to centerscreen in properties window? maybe you mess with it and it now starts at the right side.
since you created it in a higher resolution display and run it in a lower resolution will likely cropped. use the autosize from the properties window.

How to customize the screen size of ARC-Welder?

I would like to change the screen size of the ARC-Welder chrome-extention to a 7inch screen - displayed on my pc - to test an app on different screen sizes.
Can this be done using for example the meta-data input?
Similar to a question that I asked recently but I think shares the same answer. It seems that there are few choices when it comes to form factor, and based on the answer to my question I think that you can only use the three form factor presets for now.
(from #Elijah Taylor)
The size of the window is not configurable per activity*, but the orientation is. The two options in ARC Welder that control the window are:
Orientation: This is either landscape or portrait, which will be the default orientation for your app. However, if you set a screenOrientation on your Android activity, this can override the orientation per activity, with the window rotating to compensate. There is a performance cost to rotating this way because the plugin will be rotated via CSS.
Form Factor: This is one of phone, tablet, or maximized. This controls the overall size of your app globally.
but for Chrome 42 and up you can use the metadata {"resize": "reconfigure"} to allow arbitrary user resizing. Your app must be able to relayout with a variety of aspect ratios and resolutions in this mode.
My question at:Android ARC app for chrome, set size of windows for different Activities/Layouts
You can Use this MetaData :
{
"resize":"reconfigure"
}
just thought i'd mention that there is also "formFactor": "fullscreen" if want to test full screen it also works with "resize":"reconfigure"

grow or shrink UIImageView frame to fit the entire iPhone screen via AutoLayout?

So I'm still getting accustomed to the world of Auto Layout in iOS 6 and it's been a fun (or in plain English -- tough) migration coming over from strings & struts.
I have a UIImageView that's the background for a game I'm working on. Here's what a regular 3.5" Retina Display looks like in Interface Builder:
but if I change the "Size" pop-up in the Simulated Metrics field for the content view to "Retina 4 Full Screen", here's what I see:
And you can see the ugly black bar appearing along the bottom edge of the simulated iPhone 5 screen. This same ugly black bar makes it over to the compiled app running in the iPhone 5 simulator.
Are there any attributes or constraints I can apply via Interface Builder to get the UIImageView's frame to size correctly for the appropriate iPhone device screen size?
Or do I have to enter in constraints via code? (ugh)
I've watched the three WWDC videos and if the engineers covered the topic of sizing a view to fit a parent, they must have glossed over it really fast because I've haven't yet found or heard a decent method to get both UIImageView and NSImageView to size correctly to their parent views under both the iOS and MacOS side.
From what you're showing here, I think that what you want to do is drag the image to meet the bottom of the superview so that it takes up all of the space you want. On the bottom right in the IB view you will see a small, grey pill-shaped set of 3 buttons. Click the center one (once you have your imageView selected). It's the one that looks a little like this: |--|. It will bring up a list of constraints. Once you have done that, select "Bottom Space to Superview". You should then be able to switch between phones and have the image resize automatically.

set ios screen resolution in xcode4 storyboard

Am working on an ipod/iphone application that primarily captures a photo. Am designing the flow in xcode4 IB storyboard.
However, as you can see from the image it is taking the default resolution as 320x480 which causing the preview on ipod retina display to show up in a corner than full screen. How can I make the IB get device resolution and adjust the ratio accordingly?
I tried looking at project settings, build settings, info.plist however couldn't find an answer yet.
Thx
Those dimensions are in points, not pixels. They are correct. On retina displays, 320 points are equal to 640 pixels. If your application is only showing up in a quarter of the screen, it's likely the problem is in your code, not in how you have set things up in Interface Builder.

Resources