On the #Cocoa port, I'll probably create one CGImage by tile, and cache them.
On each frame, I can then draw the CGImages on a CGBitmapContext— and pass the buffer to OpenGL or Metal.
I just wonder how to update the CGImages when the underlying buffer changes. Do I need to re-create the image? Or can I update the underlying buffer directly? What about locking or race conditions?
Stay tuned for the next episode of graphics-programming-for-newbies!
Generalistic and moderated instance. All opinions are welcome, but hate speeches are prohibited. Users who don't respect rules will be silenced or suspended, depending on the violation severity.