-
Notifications
You must be signed in to change notification settings - Fork 901
Closed
Description
in view.cpp ~300th line
maybe replace with the following code
const int zsize = zl*zl;
// GLfloat zs[zsize];
std::vector<GLfloat> zs(zsize);
#ifndef HAVE_GLES
glReadBuffer(GL_FRONT);
// glReadPixels(x-radius,y-radius,zl,zl,GL_DEPTH_COMPONENT,GL_FLOAT,zs);
glReadPixels(x - radius, y - radius, zl, zl, GL_DEPTH_COMPONENT, GL_FLOAT, zs.data());
#else
std::fill(zs,zs+zsize, 0.8);
#endif
//const GLfloat mindepth = *(std::min_element(zs,zs+zsize));
const GLfloat mindepth = *std::min_element(zs.begin(), zs.end());
return mindepth;
}
to prevent issues related to variable sized arrays when compiling with clan on MacOS
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels