| ▲ | andrekandre 5 days ago | ||||||||||||||||
slightly off-topic perhaps, but i find it amazing that an os-level 3d graphics api can be built in such a dynamic language as objective-c; i think it really goes to show how much optimization put in `objc_msgSend()`... it does a lot of heavy lifting in the whole os. | |||||||||||||||||
| ▲ | Rohansi 5 days ago | parent | next [-] | ||||||||||||||||
Modern graphics APIs minimize the number of graphics API calls vs. OpenGL and similar. Vulkan/Metal/DirectX 12 will have you pass command buffers with many commands in them instead of separate API calls for everything. | |||||||||||||||||
| ▲ | jasonwatkinspdx 4 days ago | parent | prev | next [-] | ||||||||||||||||
It's been possible for quite some time. In the early 2000's there was a book on using Direct3D from C# that was pretty influential as far as changing people's assumption that you couldn't do high performance graphics in a GC'd language. In the end a lot of the ideas overlap with what c/c++ gamedevs do, like structuring everything around fixed sized tables allocated at load time and then minimal dynamic memory usage within the frame loop. The same concepts can apply at the graphics API level. Minimize any dynamic language overhead by dispatching work in batches that reference preallocated buffers. That gets the language runtime largely out of the way. | |||||||||||||||||
| ▲ | adamnemecek 5 days ago | parent | prev | next [-] | ||||||||||||||||
There is a Metal Obj-C API, Metal implementation is C++. | |||||||||||||||||
| |||||||||||||||||
| ▲ | pmalynin 5 days ago | parent | prev | next [-] | ||||||||||||||||
Yes and https://reviews.llvm.org/D69991 | |||||||||||||||||
| ▲ | monster_truck 4 days ago | parent | prev [-] | ||||||||||||||||
No, it doesn't. You won't find it used much if at all at these levels of the OS. Once you get past cocoa and friends it's restricted subsets of C++ (IOKit for example) | |||||||||||||||||
| |||||||||||||||||