I do realize that I may have sounded rude, and I apologize for that, no hard feelings?
I actually switched from SDL to SFML for real time rotations and alpha blending. (Of course the C++ API and modern feel was definitely a plus as well.
)
I do have bbox collisions working (super simple of course, SFML provides the functionality already) and circular collisions (via radius) work fine too. However I was just trying to come up with some way to get a collision (with alpha tolerance) between two rotates sprites. My current method draws two sprites to a white surface and if there is any overlap black pixels appear. This works fine, but then I have to get the pixel data which again is slow.
My code is fairly simple:
sf::RenderTexture Surface;
Surface.create(640, 480);
Surface.clear(sf::Color(255, 255, 255, 0));
Sprite1.setColor(sf::Color(0,0,0,255));
Sprite2.setColor(sf::Color(0,0,0,255));
Surface.draw(Sprite1, sf::BlendMode::BlendAdd);
Surface.draw(Sprite2, sf::BlendMode::BlendMultiply);
Surface.display();
Any overlap of Sprite1 with Sprite2 shows as non-white pixels. Is there a fast way to compare textures to have all the same color pixels?
If not what would be the best approximation method? Some sort of recursive rectangle or circle collision checking?