- Edited
jonSS blit/blend is massive pile of st
It isn't. You just don't understand how it works.
I think the main problem is that you're not aware that Image object and Texture object are two different things. The former represents pixel data residing in CPU address space (RAM), where CPU can manipulate pixels, including blitting, while the latter represents pixels in the GPU address space (video RAM) where they're used for drawing onto the screen by the GPU but can't really be manipulated directly by the CPU. The data transfer between the two is always done by copying (duplicating), not by reference. So if you pull some pixels from a Texture object into an Image object (via Texture2D::get_image()
for example), then let the CPU intervene on that data (e. g. blit something into it), in order for this data to be shown on the screeen, a new Texture object must be created/initialized from this data.
The error above is caused by your code trying to use a Texture object returned by the loading function as if it was an Image object. If you want to load a bitmap resource as an Image object you need to specify that in resource's import options. Otherwise it will default to import it as a Texture object, i.e. it goes straight into video RAM for drawing.