Commits (5)
......@@ -572,13 +572,13 @@ int main(int argc, char **argv)
}
}
// After setting all Options from command line, build the real gui
w->init();
#ifndef __APPLE__
initGlew();
#endif
// After setting all Options from command line, build the real gui
w->init();
const QStringList positionalArguments = parser.positionalArguments();
for ( auto file: positionalArguments ) {
......
if(LIBIGL_INCLUDE_DIR)
set(LIBIGL_FOUND TRUE)
set(LIBIGL_INCLUDE_DIRS "${LIBIGL_INCLUDE_DIR}")
else()
find_path(LIBIGL_INCLUDE_DIR
NAMES igl/igl_inline.h
PATHS "${CMAKE_SOURCE_DIR}/libs/libigl/include")
set(LIBIGL_INCLUDE_DIRS "${LIBIGL_INCLUDE_DIR}")
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LIBIGL DEFAULT_MSG LIBIGL_INCLUDE_DIR)
mark_as_advanced(LIBIGL_INCLUDE_DIR)
endif()
......@@ -226,7 +226,18 @@ glViewer::~glViewer()
void glViewer::makeCurrent() {
#if (QT_VERSION >= QT_VERSION_CHECK(5,4,4))
const GLuint prevFbo = ACG::GLState::getFramebufferDraw();
#endif
// calling makeCurrent binds the default FBO when QOpenGLWidget is used
glWidget_->makeCurrent();
#if (QT_VERSION >= QT_VERSION_CHECK(5,4,4))
//restore the previously bound FBO, if it was not 0 as Qt Documentation says we shall not bind 0
if(prevFbo != 0)
ACG::GLState::bindFramebuffer(GL_FRAMEBUFFER, prevFbo);
#endif
}
......