CPU Rendering is missing
I can't find any APIs for rendering using the CPU. Also, I can't find any API to render whatsoever.
I noitced you opened a pull request to include some abstruction for surfaces and stuff but it's missing on master. Is there any guide explaining how this crate is supposed to be used?
Do you mean you want to render on the CPU to a buffer within the CPU? For that you can just render into a vec of pixels and then put a quad on the screen using GL or VK. However, SDL doesn't really have anything that helps you do that.
I had considered adding code for SDL's built in "SDL Renderer" API, but didn't end up doing that in the current version. Since SDL is working on their 3.x series now, I decided to not really work on much SDL related stuff until that's out.
Yeah, I mean SDL Renderer (I think). Eagerly awaiting for sdl 3 then.
I could probably get some of it working soon. Actually I finished up a release of imagine yesterday so this is good timing of you to ask.
That would be great. I don't like how the sdl crate does its abstractions.
I started putting in some today. I got as far as being able to set the coloring of the rendering fns and thought to check with the SDL folks if the "set renderer color" value is supposed to be sRGB inputs or linear inputs. One person reported that the SDL renderer is only using sRGB, even during blending. Unfortunately, this means that their renderer will basically always produce wrong outputs any time a blend happens.
So I'm willing to fill in a few more of the essential functions and release it, but i would strongly suggest against using their blending support.
Wow, that sounds bad. I don't understand much about color blending but I know there are some quirks which can make colors show wrong
here's an article about it https://www.realtimerendering.com/blog/png-srgb-cutoutdecal-aa-problematic/
i got diverted from this lately but I'll try to remember to do a little more and get something out.
don't worry too much about it :)
For now, I'm using the sdl crate. I don't like its abstractions but it kind of works I guess. It's a side project so I haven't been able to work on it anyways.