COpenGLView and Carbon

A user interface toolkit mainly for audio plug-ins (VST, AudioUnit, etc).
ray
Posts: 85
Joined: Fri Sep 02, 2016 9:37 am

COpenGLView and Carbon

Postby ray » Thu Nov 08, 2018 9:14 am

Hi,

I recently had to port over some of my drawing code to OpenGL, because of the fact that for fairly complex polygons, the CGContextDrawPath() based CGDrawContext::drawPolygon() implementation is so incredibly slow on Mac.

Next I realized the following lines in HIViewFrame:

#if VSTGUI_OPENGL_SUPPORT
SharedPointer<IPlatformOpenGLView> createPlatformOpenGLView () override { return nullptr; } // not supported
#endif

So it seems like OpenGL is entierly unsupported on Mac Carbon. I assume I can't expect any OpenGL support for Carbon in VSTGUI unless I implement an AGL based CarbonOpenGLView myself. AGL is now deprecated and Carbon seems on the verge of deprecation in VSTGUI too, so this seems like a rather pointless excercise.

As a workaround, I considered offering covariant COpenGLView and CView / Core Graphics based implementations of my view and then switch between the two at runtime depending on the platform. I don't think this is a particularly elegant way of handling this, so what do you guys suggest?

Thanks!

Best,
Ray

Return to “VSTGUI”

Who is online

Users browsing this forum: No registered users and 1 guest