Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CMake flag FORCE_OPENGL_ENABLED #1654

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

clintlombard
Copy link

This allows building Colmap with GUI_ENABLED=OFF, but still allowing OpenGL support.

Related to #1431

@@ -36,9 +36,7 @@
#include <memory>

#include "FLANN/flann.hpp"
#if !defined(GUI_ENABLED) && !defined(CUDA_ENABLED)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I may be mistaken, but having these here doesn't make sense because GL_LUMINANCE and GL_UNSIGNED_BYTE in ExtractSiftFeaturesGPU won't be defined. This causes compilation errors.

@ahojnnes
Copy link
Contributor

Thanks and apologies for the slow response. I think, the change looks good, but I would suggest to revert the option and call it DISABLE_OPENGL, which would be off by default?

@RemiLacroix-IDRIS
Copy link

RemiLacroix-IDRIS commented Dec 21, 2022

Note that OpenGL handling is generally a bit weird. The option says Whether to enable OpenGL, if available but the package is always flagged as required in CMakeLists.txt: find_package(OpenGL REQUIRED). It means you actually cannot compile if OpenGL (and glew) are not found.

@kuuhakuJ
Copy link

thx, it works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants