Original Post
ok...i can''t get anything other than a one from my z-buffer. yes i''m clearing it. Yes i''m checking after i render
.
z-buffer init code....
read code...MouseX and MouseY are window coordinates...
i can read color values fine, but z-buffer values don''t give me anything but a one. thanks for help
glEnable(GL_DEPTH_TEST); glClearDepth(1.0f); glDepthFunc(GL_LEQUAL);
float MouseZ = 1; RECT r; GetWindowRect (Driver->hWnd ,&r); float MouseY2 = r.bottom - r.top - Driver.TitleSize - MouseY; glReadPixels (MouseX,MouseY2,1,1,GL_DEPTH_COMPONENT, GL_FLOAT, &MouseZ);