Retina and Carbon HIView vs Cocoa
-
- KVRAF
- Topic Starter
- 4735 posts since 18 Jul, 2002 from London, UK
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?
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.
Find me on LinkedIn or elsewhere if you need to get in touch.
-
- KVRian
- 876 posts since 24 Jun, 2002 from Berlin
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
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
-
- KVRer
- 18 posts since 21 Aug, 2001
Yes, but the host has to create the window with the kWindowFrameworkScaledAttribute attribute, it's oneWhat 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.
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.
-
- KVRAF
- Topic Starter
- 4735 posts since 18 Jul, 2002 from London, UK
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.
Find me on LinkedIn or elsewhere if you need to get in touch.
-
- KVRAF
- Topic Starter
- 4735 posts since 18 Jul, 2002 from London, UK
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.
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.
Find me on LinkedIn or elsewhere if you need to get in touch.
-
- KVRAF
- 2393 posts since 28 Mar, 2005
UVIWorkstation do not supports Carbon in AU for more than 2 years and we never had any compatibility report.
-
- KVRAF
- 2393 posts since 28 Mar, 2005
Just add support for cockos extension and don't bother much imho regarding issue in Carbon
-
- KVRAF
- Topic Starter
- 4735 posts since 18 Jul, 2002 from London, UK
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!
@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.
Find me on LinkedIn or elsewhere if you need to get in touch.
-
- KVRer
- 18 posts since 21 Aug, 2001
Sorry for the late reply, I wasn't set to receive email notifications.
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.@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!