Requirements :
- I need to draw 2D lines, circles, boxes. Fast. That's it.
- I don't want to learn objC, Swift, Xcode.
- I'm using C++ and Jetbrains' CLion.
- OpenGL is deprecated (or soon to be) on Mac
- I don't even care about Apple (as you probably guessed), but the M1 processor is just too good. (and fanless <3)
- I'll be happy as long as it runs on my MacBook Air
- Text would be a useful feature but totally optional
- I won't even use sprites, or any kind of assets, sound, keyboard, mouse, IO, GUI. I need pure non-interactive visualisation of science-ish stuff.
- fast FPS, refreshing the visualization as fast as possible.
- Even if it's a pure framebuffer (an array of pixels), I'll manage.
- If it's a full fledged 3D accelerated graphic library (eg : openGL, Vulkan, Metal), it also works for me.
- "as long as it works"
What kind of options are available to me with the aforementioned requirements ?
- use openGL anyway and cry when it will no longer works ? (meh)
- hack my way to Metal in C++ ?
- I'm fine if a suggested library isn't Object Oriented (eg : openGL)
- Vulkan ?
- I still need to open a graphic window context somehow
- SDL2 appears to have a some kind of Metal backend/port/whatever but all the exemples I find are in ObjC.
- honestly, my post feel like I'm crying for a documented c++ metal wrapper of some kind I suppose ?
EDIT :
- I read mixed message and confusion on the Future of OpenGL on Mac. Mostly about "no longer supported" vs "Deprecated". Will OpenGL be removed and no longer works. Or it will works but won't be updated anymore ? (considering my requirements, an outdated version of OpenGL is perfectly fine to me)
Thank you <3
-
—
ker2x
-
—
OOPer
Add a CommentPS : If I really "must" use Xcode (for some obscure mandatory reasons), I guess I will. However, forget about telling me to code my software in ObjC or Swift. I already tried.
Metal runtime is strongly and tightly coupled with the Apple's UI frameworks -- intended to be used with ObjC or Swift. So, you should better give up the option -- hack my way to Metal in C++. Meaning use openGL anyway and cry when it will no longer works ? (meh) would be the only options if you insist on denying to learn ObjC or Swift. And
Deprecatedin Apple's frameworks means that it is not recommended to use it any more and will be removed at any time in the future. So, if your M1 Mac can run OpenGL apps currently, it would work for a while -- an unpredictable period. It may be months or less, or years.