Whenever I read a depth value back from my buffer I get
1.0 if the pixel I read is located in the right part (fifth or so)
of the window. Depth values read from the left part of the window are
correct.
I have a Radeon 9000 Pro and use the latest Debian packages from
John Lightsey, compiled with S3TC support in. The problem isn't new
though as it occurs with the older pakcages from Michael DÃnzer as well.
Philipp Klaus Krause
int engine::unproject(GLdouble *loc, const double x, const double y)
{
GLfloat z;
glPushAttrib(GL_PIXEL_MODE_BIT);
glReadBuffer(GL_FRONT);
glReadPixels(GLint(x), GLint(y), 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT, &z);
glPopAttrib();
GLdouble pm[16], mm[16];
GLint vp[4];
glGetDoublev(GL_PROJECTION_MATRIX, pm);
glGetDoublev(GL_MODELVIEW_MATRIX, mm);
glGetIntegerv(GL_VIEWPORT, vp);
std::cout << "\nz: " << z;
std::cout.flush();
GLboolean b = gluUnProject(x, y, z, mm, pm, vp, &loc[0], &loc[1], &loc[2]);
return(!(b == GL_TRUE));
}
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
--
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel