santiagofs's picture

GL.ReadPixels failure on a certain equipment?

Hi all,

I developed a small tool for computing the object coordinates of a certain pixel picked by the user. I used GL.ReadPixels to read the depth component of such pixel, in order to obtain its Z component in window coordinates. Then, I use gluUnProject to compute the world coordinates. It worked well, no problem.
The problem came when I discovered that my app worked in all the PCs except on a certain laptop. After comparing results of exactly the same operation in the same conditions and in several PCs, I found out that the return value (winZ) of GL.ReadPixels was always the same except on such laptop. Therefore, the error seems to be there.

GL.ReadPixels<float>(winX, winY, 1, 1, OpenTK.Graphics.OpenGL.PixelFormat.DepthComponent, PixelType.Float, ref winZ);

The question is if anyone could know... how can this occur? Why different result for GL.ReadPixels on a certain equipment?.

The equipment specs are:

Many thanks!
Happy 2013


Comment viewing options

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

Did you try updating the video drivers?

santiagofs's picture

Yes, of course. The drivers are updated.