Retina Headaches (or how does Sam still have hair?)

Sign on to the following feedback case as it will allow us to take NSImages from declares and create a Xojo picture wrapper for the NSImage, which will make life oh so easier (he claims) <https://xojo.com/issue/42528>.

If you think Retina is tough; you should see what I’m working on right now. I have an application in development that use OpenGL, scrollviews with dynamic content (from Container Controls) and CALayerAnimation on a layer-backed window. Nothing works correctly at all, and it seems like every time I get a win with one issue, another issue pops up somewhere else.

Layer-Backed views seem fundamentally broken, either it’s because they are, or it’s because I’m trying to manipulate Xojo controls in layer-backed views. The trouble is it’s such a complicated project that I can’t simply re-write it Objective-C to help narrow down the issues (unlike the Retina Kit and Sandbox Kit, where chunks were written in Objective-C and then translated to Xojo).

@Sam: you now doing games with OpenGL? What is a layer-backed window?

According to you picture besides your face even nose and ears seem very hairy.

Not games, I’m using Core Image with OpenGL (super fast and smooth updates), but it brings a “bag of hurt” to the table when trying to create a modern interface that’s based upon Apple’s Layer-Backed Views. Layer-backed Views solve some visual glitches with Yosemite and up, but add more pain in the process, they’re basically views that contain a third layer of caching. It allows for much smoother animations and also NSVisualEffects.

The main issue I have with Core Image and OpenGL on a layer-backed window, is that often the OpenGLSurface will flush it’s back buffer without generating the contents, which results in a pure black view and no content. Most of the time it happens when the window activates and deactivates, even with auto deactivate disabled. I’ve used a timer with a period of 1 to update, but theres a black flash before the content is redrawn.

So did anyone ever figure how to adjust the picture.graphics.scaleX or scaleY without that causing the graphic’s size to no longer match the associated picture?

Adjusting ScaleX and ScaleY on the graphics object of a picture affect how things render onto that picture, not the picture itself.

Could you give an example?

NOTE, I’ll be doing a session on the new Retina capabilities at XDC 2016.