OpenFrameworks app display in Macbook Pro with Retina display

Does anyone know or found the way to make OF apps look nice on Mac retina display screen?
I know that I’m really not need it yet in term of development since now it still not a wide spread machine.

But pixelating apps just bugs me.
If anybody know the way to work around it would be very appreciated! :slight_smile:

Thanks,
Firm?

I’m thinking it’s probably exactly the same as programming for any high-resolution device: watch your image scaling, keep in mind that video is going to be way more resource intensive, use vectors/raw OGL where possible.

Looks like GLUT can’t do retina-resolution on the Retina MBPs. You have to go Cocoa OpenGL to do it: http://www.opengl.org/discussion-boards/showthread.php/178916-Using-the-retina-display-on-a-macbook-pro It looks like there are some addons that enable using OF in Cocoa windows such as: https://github.com/julapy/ofxCocoaWindow I don’t know if anyone’s tried that (or if it actually would get around the problem by using a Cocoa rendering context of if it’s still using GLUT for rendering within a Cocoa window).

you can patch the GLUT framework provided with openframeworks with the patches provided here:
http://iihm.imag.fr/blanch/software/glut-macosx/

renaud

You can enable retina support within your plist by doing the following:
[list]

  • Open your project plist (usually openFrameworks-Info.plist)

  • Right-click on an empty area and select 'Add Row’

  • Type ‘High Resolution Capable’ in key column (You will then get an autocomplete list of possible properties) and set to ‘YES’ in value column (this will be a boolean type by default)

  • Compile and Run

[/list]

When you run your app, you will notice that the chrome will now be retina enabled but anything you draw will be a quarter resolution. Piggy-backing off of joshua noble’s comment, this means you will have to double any calculations (e.g. widths, heights, x, y, etc.). Hope this helps.

5 Likes

@manchaware Wow this is awesome. I never knew there was such a simple way to enable retina support in an oF app. I’ve been living with crummy aliased text & shapes in my apps for years! This should be in the official documentation.

Is there any way to make this setting the default when using Project Generator (oF 0.9) ?

1 Like

This is outstanding. Having an option in generator is a great idea and handling all the resizing backend would be great too.

@spaghetti i think the PG uses scripts/templates/osx/openFrameworks-Info.plist (open in xcode, add the high res property, and save. next time the pg should use your new setting)

@barrylachapelle handling resizing automatically is discussed sometimes in the bugtracker, but overall it seems to result in lots of unclear situations (esp. with pixel-based stuff). manual scaling isn’t much work and gives you incredible flexibility.

1 Like