Original Post
Edit: Should this be in the Alternative Libraries forum or something? I put it here because I'm not sure it fits anywhere else, but almost as much because this is where I spend most of my time on GDNet. A few of you may remember a thread a while back where I was asking for help on rotating SDL_Surface's. My game structure has changed enough that I can't re-use the old code. I was gearing up to re-implement it when I stumbled on Boost.Gil, and realized that it was perfect for what I want. In particular, it seems that it's rotated views will do all the work for me. All I have to do is hook it up. That, of course, is proving to be the hard part. The trouble with these generic libraries is that nothing actually does anything until you hook up a bunch of stuff with a lot of different types and very long template parameter lists (I'm not bitter, really). Anyway, after reading the above-linked page a couple times, I've come up with a rough template of what my transformation function will look like, or at least the testbed function:
void Transform(SDL_Surface* src, SDL_Surface* dst){
//lock surfaces
//make boost.gil view of surfaces, possibly with transformations already applied
//apply transformations, if they haven't been applied already
//copy the transformed src view to the dest view
//unlock surfaces
}Obviously, I'm still using SDL. The main thing that's bugging me is that in the tutorial, an interleaved_view is used when getting a view of raw pixel data. What does that mean, and do I actually want a planar view, whatever that means? I googled "interleaved pixel data", and didn't find anything useful. Here are my questions: What view types do I need to use in my particular case (32-bit SDL_Surface's)? What do "interleaved" and "planar" mean as far as pixel data go, and is there anything else I need to know to understand what the crud I'm doing?