Here is my code written in c++
Code: Select all
glReadPixels(0, 0, 200, 200, GL_RGBA, GL_UNSIGNED_BYTE, pixels);
At last, I change my code
Code: Select all
glReadPixels(0, 0, 200, 200, GL_BGRA, GL_UNSIGNED_BYTE, pixels);
I have question that why Red and Blue is unexpected? What are the proper reasons?