Has anyone successfully used this function and could tell me what I'm doing wrong and how to use the function?
static unsigned char *buf = new unsigned char[( 3 * (1000) * (1000) )];
GetCursorPos(&pos);
cout << pos.x << endl;
cout << pos.y << endl;
glReadPixels(pos.x, pos.y, 1000, 1000, GL_RGBA ,GL_UNSIGNED_BYTE, buf);
cout << buf << endl;
OpenGL 3.0
WIN32 API
C++