Merge branch 'master' of github.com:openscad/openscad
This commit is contained in:
commit
0c1e91e6e3
2 changed files with 13 additions and 7 deletions
15
opengl.pri
15
opengl.pri
|
|
@ -11,11 +11,12 @@ using_qopenglwidget {
|
|||
else {
|
||||
message("Using QGLWidget")
|
||||
QT += opengl
|
||||
# see http://fedoraproject.org/wiki/UnderstandingDSOLinkChange
|
||||
# and https://github.com/openscad/openscad/pull/119
|
||||
# ( QT += opengl does not automatically link glu on some DSO systems. )
|
||||
unix:!macx {
|
||||
QMAKE_LIBS_OPENGL *= -lGLU
|
||||
QMAKE_LIBS_OPENGL *= -lX11
|
||||
}
|
||||
}
|
||||
|
||||
# see http://fedoraproject.org/wiki/UnderstandingDSOLinkChange
|
||||
# and https://github.com/openscad/openscad/pull/119
|
||||
# ( QT += opengl does not automatically link glu on some DSO systems. )
|
||||
unix:!macx {
|
||||
QMAKE_LIBS_OPENGL *= -lGLU
|
||||
QMAKE_LIBS_OPENGL *= -lX11
|
||||
}
|
||||
|
|
|
|||
|
|
@ -201,7 +201,12 @@ void QGLView::mouseDoubleClickEvent (QMouseEvent *event) {
|
|||
double y = viewport[3] - event->pos().y() * this->getDPI();
|
||||
GLfloat z = 0;
|
||||
|
||||
glGetError(); // clear error state so we don't pick up previous errors
|
||||
glReadPixels(x, y, 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT, &z);
|
||||
GLenum glError = glGetError();
|
||||
if (glError != GL_NO_ERROR) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (z == 1) return; // outside object
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue