Removed erroneous switch to the front buffer when reading depth values in sculptmode and retopo.
This commit is contained in:
@@ -2689,10 +2689,8 @@ void view3d_update_depths(View3D *v3d)
|
||||
}
|
||||
|
||||
if(d->damaged) {
|
||||
glReadBuffer(GL_FRONT);
|
||||
glReadPixels(v3d->area->winrct.xmin,v3d->area->winrct.ymin,d->w,d->h,
|
||||
GL_DEPTH_COMPONENT,GL_FLOAT, d->depths);
|
||||
glReadBuffer(GL_BACK);
|
||||
|
||||
glGetDoublev(GL_DEPTH_RANGE,d->depth_range);
|
||||
|
||||
|
||||
@@ -547,9 +547,7 @@ float get_depth(short x, short y)
|
||||
x+= curarea->winrct.xmin;
|
||||
y+= curarea->winrct.ymin;
|
||||
|
||||
glReadBuffer(GL_FRONT);
|
||||
glReadPixels(x, y, 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT, &depth);
|
||||
glReadBuffer(GL_BACK);
|
||||
|
||||
return depth;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user