Retina and Carbon HIView vs Cocoa

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

Hi all,

Question regarding Retina (HiDPI drawing) support on 32-bit OS X VST plug-ins.

Historically we've used Carbon HIViews for our view event model on 32-bit OS X, and Quartz for drawing.

On 64-bit we use Cocoa NSViews and Quartz.

The 64-bit code works fine with Retina displays in a Retina-aware host, but the 32-bit code seems not to - it draws at low resolution, even though all the drawing primitives are resolution-independent.

If I recompile it to use NSViews on the 32-bit code, that won't work in some very old hosts, but HiDPI drawing then works correctly, as on the 64-bit version.

What I'm wondering is - is there any way to get HiDPI drawing working with HIView-based code (which creates its editor via CreateUserPaneControl and HIViewAddSubView)? The owning window is created by the host, I've tried ChangeWindowAttributes() with no success.

Any ideas?
This account is dormant, I am no longer employed by FXpansion / ROLI.

Find me on LinkedIn or elsewhere if you need to get in touch.

Post

hi angus,

not exactly an answer to your question, but did you consider supporting Cockos' Cocoa extension and using NSViews for 32 bit hosts that support it? Reaper and Live 8.4+ do, maybe more.

http://www.reaper.fm/sdk/vst/vst_ext.php

oli

Post

What I'm wondering is - is there any way to get HiDPI drawing working with HIView-based code (which
creates its editor via CreateUserPaneControl and HIViewAddSubView)? The owning window is created by the
host, I've tried ChangeWindowAttributes() with no success.
Yes, but the host has to create the window with the kWindowFrameworkScaledAttribute attribute, it's one
of the attributes that cannot be enabled/disabled after creation. What would most likely be the solution for
the all cases, would be to create your own window and use windowgroups to make it follow the host-provided
window, that will require testing/tweaking but it might be less than switching everything to Cocoa for 32-bit.
But then again, it's only for the 32-bit version which might not be worth the dev time.

Post

Window Groups are an absolute world of pain. I might see if it's possible to use Cocoa-32 for the AU and Carbon for the VST for compatibility - or those Reaper extensions.
This account is dormant, I am no longer employed by FXpansion / ROLI.

Find me on LinkedIn or elsewhere if you need to get in touch.

Post

On a related note - do any modern AU hosts *not* support Cocoa views?

Thinking to deprecate Carbon HIView support for my AU stack, build almost entirely Cocoa, but provide a compatibility layer for old Carbon VST hosts.
This account is dormant, I am no longer employed by FXpansion / ROLI.

Find me on LinkedIn or elsewhere if you need to get in touch.

Post

UVIWorkstation do not supports Carbon in AU for more than 2 years and we never had any compatibility report.
Olivier Tristan
Developer - UVI Team
http://www.uvi.net

Post

Just add support for cockos extension and don't bother much imho regarding issue in Carbon
Olivier Tristan
Developer - UVI Team
http://www.uvi.net

Post

Thanks all, that seems to have done the trick.

@seb does Bidule 32-bit support the Cockos extension for VST plug-ins, or not? Need to make sure both cases are thoroughly tested, as it's a big code change!
This account is dormant, I am no longer employed by FXpansion / ROLI.

Find me on LinkedIn or elsewhere if you need to get in touch.

Post

Sorry for the late reply, I wasn't set to receive email notifications.
@seb does Bidule 32-bit support the Cockos extension for VST plug-ins, or not? Need to make sure both cases are thoroughly tested, as it's a big code change!
Not currently, although there's been an unused code path to have VST + Cocoa UI in 32-bit for a while. I'll test and try to make it work for the next release.

Post Reply

Return to “DSP and Plugin Development”