I'm trying to save in memory the output of a rotated texture. I want this to make the collision masks of my game engine(I'm creating this separated topic because someone could find it useful). I just did it programmatically, but use OpenGL for sure would be faster!
This is what I want, a two-dimensional array with byte(boolean would be better) values:
The left is the original, the right is the result of rotating. Also, the mask is not printed on the screen, this process should be all hidden.
Does anyone know which function of the OpenGL library I shoud use and how?
The legacy command would be glRotate(), but note that as of OpenGL 3.0 it has been deprecated in favor of doing it via shader programs.
I don't have much experience in that regard, so that's about all I can tell you. I think maybe you could do it as a fragment shader (which, unless I am mistaken, handles the pixel/color rendering), and simply port standard rotation code to GLSL.