Hi! I'm using c#, and i would like to copy my screen content to a byte array:
byte image = new byte[resX * resY]; GL.ReadPixels(0, 0, resX, resY, PixelFormat.Bgr, PixelType.Byte, image);
I tried it with this method, but when the program gets at the GL.ReadPixels method, i get an error message of: "Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
what am i doing wrong?