Anonymous's picture

ReadPixels() Error

Hello,

at first I want to thank the team behind OpenTK for the great work!

I think I found a bug in the ReadPixel() function. It seems that everything is mirrored on the y-axis. Perhaps I do something wrong. Does anyone have any experience using this function?


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler.'s picture

Thanks :)

According to the ReadPixels documentation, the coordinate (0,0) (as in GL.ReadPixels(0, 0, ...)) maps to the lowest left corner of the window. Note that this is different from the system used in most 2D libraries, like SDL or Allegro, where (0,0) maps to the upper left corner of the window!

I have confused this many times, maybe that's what is going on? There is no code in OpenTK that could have introduced such a bug.

If you could post some code I could help you locate the problem.

Forlom's picture

Hi,

yeah that's exactly what I'm talking about. So it's not a bug, I just didn't know that behavior of ReadPixels().

Thank You

Bye