diff --git a/CMakeLists.txt b/CMakeLists.txt
index 143f3163d2c81f24fd73e5d4c804deb2e8b0bd55..9cee03c6a021ca8e65135bc3833f6030773f9afa 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -26,7 +26,6 @@ include(VERSION.cmake)
 option(BORNAGAIN_PYTHON "Build with python support" ON)
 option(BORNAGAIN_GUI "Build a graphical user interface" ON)
 option(BORNAGAIN_TIFF_SUPPORT "Tiff files read/write support" ON)
-option(BORNAGAIN_OPENGL "Build additional modules for 3D in GUI" ON)
 option(UNITTESTS "Don't skip unit tests" ON)
 
 option(BORNAGAIN_MPI "Build with MPI support" OFF)
diff --git a/GUI/CMakeLists.txt b/GUI/CMakeLists.txt
index 62655b408b3d73c090f4d3eb243ee00d45417cc6..33fbcf676ff63feba989b7ae2038801b34d216cd 100644
--- a/GUI/CMakeLists.txt
+++ b/GUI/CMakeLists.txt
@@ -6,13 +6,8 @@ message(STATUS "Configuring BornAgain GUI")
 
 set(CMAKE_AUTOMOC ON)
 
-if(BORNAGAIN_OPENGL)
-    message(STATUS "Configuring BornAgain OpenGL")
-    add_subdirectory(ba3d)
-endif()
-
+add_subdirectory(ba3d)
 add_subdirectory(coregui)
-
 add_subdirectory(main)
 
 set(BornAgainGUI_INCLUDE_DIRS ${BornAgainGUI_INCLUDE_DIRS} PARENT_SCOPE)
diff --git a/GUI/coregui/CMakeLists.txt b/GUI/coregui/CMakeLists.txt
index ff888bf08572f1620b0c775d98be7f3e84a2c746..d3a1442b97270fc3a89f706cd317046673dac836 100644
--- a/GUI/coregui/CMakeLists.txt
+++ b/GUI/coregui/CMakeLists.txt
@@ -23,12 +23,10 @@ set(include_dirs
     ${CMAKE_CURRENT_SOURCE_DIR}/Views/ImportDataWidgets
     ${CMAKE_CURRENT_SOURCE_DIR}/Views/ImportDataWidgets/CsvImportAssistant
     ${CMAKE_CURRENT_SOURCE_DIR}/Views/CommonWidgets
+    ${CMAKE_CURRENT_SOURCE_DIR}/Views/RealSpaceWidgets
     ${CMAKE_CURRENT_SOURCE_DIR}/Views/SpecularDataWidgets
 )
 
-if(BORNAGAIN_OPENGL)
-    list(APPEND include_dirs ${CMAKE_CURRENT_SOURCE_DIR}/Views/RealSpaceWidgets)
-endif()
 
 set(source_files)
 set(include_files)
@@ -94,9 +92,6 @@ set(${library_name}_LIBRARY ${library_name} PARENT_SCOPE)
 
 
 # --- dependencies ---------
-if(BORNAGAIN_OPENGL)
-target_compile_definitions(${library_name} PUBLIC -DBORNAGAIN_OPENGL)
-endif()
 target_include_directories(${library_name} PUBLIC ${QtAddOn_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR})
 target_include_directories(${library_name} PUBLIC ${include_dirs})
 target_link_libraries(${library_name} ${QtAddOn_LIBRARIES} ${BornAgainCore_LIBRARY} ${ba3d_LIBRARY})
diff --git a/GUI/coregui/Views/SampleDesigner/RealSpacePanel.cpp b/GUI/coregui/Views/SampleDesigner/RealSpacePanel.cpp
index 12209f18d99f81b55728af6271daa45f8e5e76b4..0d54d274ce0a53ff0b30a008dded56b9cf5abbec 100644
--- a/GUI/coregui/Views/SampleDesigner/RealSpacePanel.cpp
+++ b/GUI/coregui/Views/SampleDesigner/RealSpacePanel.cpp
@@ -13,9 +13,7 @@
 // ************************************************************************** //
 
 #include "GUI/coregui/Views/SampleDesigner/RealSpacePanel.h"
-#ifdef BORNAGAIN_OPENGL
 #include "GUI/coregui/Views/RealSpaceWidgets/RealSpaceWidget.h"
-#endif
 #include <QVBoxLayout>
 
 RealSpacePanel::RealSpacePanel(SampleModel* sampleModel, QItemSelectionModel* selectionModel,
@@ -30,11 +28,8 @@ RealSpacePanel::RealSpacePanel(SampleModel* sampleModel, QItemSelectionModel* se
     layout->setSpacing(0);
     layout->setContentsMargins(0, 0, 0, 0);
 
-#ifdef BORNAGAIN_OPENGL
     m_realSpaceWidget = new RealSpaceWidget(sampleModel, selectionModel, this);
     layout->addWidget(m_realSpaceWidget);
-#endif
-
     setLayout(layout);
 }
 
diff --git a/GUI/coregui/Views/TestView.cpp b/GUI/coregui/Views/TestView.cpp
index 21595f6436614eaf444df803ba4e76ab797c019f..c824faffe9f13538b1d3b183d0ffc8de4dab1389 100644
--- a/GUI/coregui/Views/TestView.cpp
+++ b/GUI/coregui/Views/TestView.cpp
@@ -27,14 +27,11 @@
 #include "GUI/coregui/Views/MaskWidgets/MaskEditor.h"
 #include "GUI/coregui/Views/MaterialEditor/MaterialEditor.h"
 #include "GUI/coregui/Views/PropertyEditor/TestComponentView.h"
+#include "GUI/coregui/Views/RealSpaceWidgets/RealSpaceWidget.h"
 #include "GUI/coregui/Views/SpecularDataWidgets/Plot1DCanvas.h"
 #include "GUI/coregui/mainwindow/mainwindow.h"
 #include <QTreeView>
 
-#ifdef BORNAGAIN_OPENGL
-#include "GUI/coregui/Views/RealSpaceWidgets/RealSpaceWidget.h"
-#endif
-
 #include <QCheckBox>
 #include <QLineEdit>
 
@@ -175,10 +172,8 @@ void TestView::test_ba3d()
     QVBoxLayout* layout = new QVBoxLayout;
     layout->setMargin(0);
     layout->setSpacing(0);
-#ifdef BORNAGAIN_OPENGL
     RealSpaceWidget* widget = new RealSpaceWidget(m_mainWindow->sampleModel());
     layout->addWidget(widget);
-#endif
     setLayout(layout);
 }
 
diff --git a/Tests/UnitTests/GUI/TestRealSpaceBuilderUtils.cpp b/Tests/UnitTests/GUI/TestRealSpaceBuilderUtils.cpp
index b77e0c9964f743ae2cad3011a5ceb8730568687f..66deaedb089467ca67cf192ee24b9675c2b38462 100644
--- a/Tests/UnitTests/GUI/TestRealSpaceBuilderUtils.cpp
+++ b/Tests/UnitTests/GUI/TestRealSpaceBuilderUtils.cpp
@@ -1,8 +1,6 @@
 #ifndef TESTREALSPACEBUILDERUTILS_H
 #define TESTREALSPACEBUILDERUTILS_H
 
-#ifdef BORNAGAIN_OPENGL
-
 #include "Core/DecoratedFormFactor/IFormFactorDecorator.h"
 #include "Core/Particle/Particle.h"
 #include "Core/Scattering/IFormFactor.h"
@@ -244,6 +242,4 @@ TEST_F(TestRealSpaceBuilderUtils, test_particle3DContainerVector)
     EXPECT_EQ(particle3DContainer_vector.at(2).particleType(), Constants::ParticleType);
 }
 
-#endif // BORNAGAIN_OPENGL
-
 #endif // TESTREALSPACEBUILDERUTILS_H
diff --git a/cmake/bornagain/modules/SearchQt.cmake b/cmake/bornagain/modules/SearchQt.cmake
index a44cda19554079f1ccb8bbbcdf18e651a5c47fd8..2b468fc9167716ec6024072bf7619f80abf6455b 100644
--- a/cmake/bornagain/modules/SearchQt.cmake
+++ b/cmake/bornagain/modules/SearchQt.cmake
@@ -14,14 +14,8 @@ if(${Qt5Core_VERSION} VERSION_LESS "5.5.1")
     message (FATAL_ERROR "Qt 5.5.1+ is required, have ${Qt5Core_VERSION_STRING}")
 endif()
 
-if(BORNAGAIN_OPENGL)
-    find_package(OpenGL)
-    find_package(Qt5OpenGL)
-    if(NOT ${OpenGL_FOUND} OR NOT ${Qt5OpenGL})
-        message(WARNING "OpenGL was not found. Switching 3D support off: BORNAGAIN_OPENGL=OFF.")
-        set(BORNAGAIN_OPENGL OFF)
-    endif()
-endif()
+find_package(OpenGL REQUIRED)
+find_package(Qt5OpenGL REQUIRED)
 
 get_target_property(Qt5Widgets_location Qt5::Widgets LOCATION_Release)
 message(STATUS "  ${Qt5Widgets_LIBRARIES} ${Qt5Widgets_location}")
@@ -29,9 +23,7 @@ get_target_property(Qt5Core_location Qt5::Core LOCATION_Release)
 message(STATUS "  ${Qt5Core_LIBRARIES} ${Qt5Core_location}")
 get_target_property(Qt5Gui_location Qt5::Gui LOCATION_Release)
 message(STATUS "  ${Qt5Gui_LIBRARIES} ${Qt5Gui_location}")
-if(BORNAGAIN_OPENGL)
-    get_target_property(Qt5OpenGL_location Qt5::OpenGL LOCATION_Release)
-    message(STATUS "  ${Qt5OpenGL_LIBRARIES} ${Qt5OpenGL_location}")
-endif()
+get_target_property(Qt5OpenGL_location Qt5::OpenGL LOCATION_Release)
+message(STATUS "  ${Qt5OpenGL_LIBRARIES} ${Qt5OpenGL_location}")
 
 message(STATUS "  Includes: ${Qt5Widgets_INCLUDE_DIRS}")