'2D graphics API for an interactive GUI to replace OpenGL on MacOS

Apple has deprecated OpenGL. In anticipation of OpenGL being removed from MacOS altogether, I would like to rebuild my mouse driven GUI using some other graphics API. Are there any similar or preferably higher level 2D APIs for MacOS that would allow me to:

  1. draw simple primitives like lines, and rectangles and also bezier curves
  2. "pick" arbitrary complex objects (e.g., a la OpenGL GL_SELECT mode)
  3. render text with preferably high quality fonts

I would provide the windowing system, mouse events and the main loop.

The library should be available as or be possible to compile into a shared library, framework or something similar. I would be accessing it through a FFI.

I'm not looking for a GUI toolkit per se, as I would be providing the widgets myself, but as long as the library gives you access to the lower level graphics primitives that would not be a problem.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source