ArborealAudio / arbor

Easy-to-use audio plugin framework
https://arborealaudio.com
MIT License
33 stars 1 forks source link

Switch from apparently-deprecated NSDrawBitmap to using CoreGraphics for software rendering #2

Closed ArborealAudio closed 5 months ago

ArborealAudio commented 5 months ago

~We get a warning each time we launch the plugin that the incorrect bits-per-pixel is passed to NSDrawBitmap, though I can't figure out why this would be the case.~

EDIT: Apparently the warning was because we lied about not having alpha in our color when we clearly do. Will probably still migrate to CoreGraphics tho.

So we're using NSDrawBitmap to render our software-rendered bitmap on MacOS.

The function also appears to be sort of deprecated and it seems like they want to ditch support for it at some point. It'd probably be better to use proper CoreGraphics stuff for at least getting our pixel data to the screen. Not totally sure how that will work, but I imagine there is a good API for just putting a bitmap to the screen, and then we can focus on an alternative CoreGraphics backend after that.