Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit a7662ce8 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Remove the USEOPENGL cmake option

This also removes the HAVE_OPENGL define. Krita now always needs
Qt's opengl support to build.
parent 22d0ade1
......@@ -143,11 +143,6 @@ message(STATUS "Release build: ${RELEASE_BUILD}")
#############
############
if (APPLE)
set(USEOPENGL OFF)
else()
option(USEOPENGL "Allow the use of OpenGL for Krita" ON)
endif()
option(PACKAGERS_BUILD "Build support of multiple CPU architectures in one binary. Should be used by packagers only." OFF)
if (WIN32)
option(USE_BREAKPAD "Build the crash handler for Krita (only on windows)" OFF)
......@@ -256,11 +251,9 @@ find_package(Qt5 ${MIN_QT_VERSION}
set(QT_QTTEST_LIBRARY Qt5::Test)
if (USEOPENGL)
if (NOT WIN32 AND NOT APPLE)
find_package(Qt5 ${MIN_QT_VERSION} REQUIRED X11Extras)
endif()
endif ()
if (NOT WIN32 AND NOT APPLE)
find_package(Qt5 ${MIN_QT_VERSION} REQUIRED X11Extras)
endif()
include (MacroLibrary)
include (MacroAdditionalCleanFiles)
......@@ -452,24 +445,13 @@ macro_bool_to_01(OCIO_FOUND HAVE_OCIO)
##
## Look for OpenGL
##
set(HAVE_OPENGL 0)
if (USEOPENGL)
# TODO: see if there is a better check for QtGui being built with opengl support (and thus the QOpenGL* classes)
if(Qt5Gui_OPENGL_IMPLEMENTATION)
message(STATUS "Found QtGui OpenGL support")
set(HAVE_OPENGL 1)
else()
message(STATUS "Did NOT find QtGui OpenGL support. Check your Qt configuration")
endif()
endif()
if(HAVE_OPENGL)
message(STATUS "OpenGL found -- krita will be able to use OpenGL for hardware accelerated rendering.")
# TODO: see if there is a better check for QtGui being built with opengl support (and thus the QOpenGL* classes)
if(Qt5Gui_OPENGL_IMPLEMENTATION)
message(STATUS "Found QtGui OpenGL support")
else()
message(STATUS "OpenGL NOT found - krita will not be able to use OpenGL for hardware accelerated rendering.")
message(FATAL_ERROR "Did NOT find QtGui OpenGL support. Check your Qt configuration.")
endif()
##
## Test for eigen3
##
......
......@@ -43,9 +43,6 @@
/* Defines if your system has the OpenEXR library */
#cmakedefine HAVE_OPENEXR 1
/* Defines if you have GL (Mesa, OpenGL, ...) and Qt GL support */
#cmakedefine HAVE_OPENGL 1
/* Defines if we use lcms2 */
#cmakedefine HAVE_LCMS2 1
......
......@@ -91,7 +91,7 @@ install(FILES krita.appdata.xml DESTINATION ${SHARE_INSTALL_PREFIX}/appdata/ )
install(DIRECTORY DESTINATION ${DATA_INSTALL_DIR}/krita/shortcuts)
if (HAVE_OPENGL AND Qt5Quick_FOUND)
if (Qt5Quick_FOUND)
add_subdirectory(sketch)
# add_subdirectory(gemini)
endif ()
......@@ -87,10 +87,8 @@ extern "C" int main(int argc, char **argv)
QCoreApplication::setAttribute(Qt::AA_X11InitThreads, true);
#endif
#if defined HAVE_OPENGL
QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true);
QCoreApplication::setAttribute(Qt::AA_DontCreateNativeWidgetSiblings, true);
#endif
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true);
#if QT_VERSION >= 0x050600
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
......
......@@ -43,11 +43,7 @@
#include <QTimer>
#include <QPointer>
#include <KoConfig.h> // for HAVE_OPENGL
#ifdef HAVE_OPENGL
#include <QOpenGLWidget>
#endif
#include <math.h>
......@@ -67,11 +63,9 @@ void KoCanvasControllerWidget::Private::setDocumentOffset()
bool isCanvasOpenGL = false;
QWidget *canvasWidget = canvas->canvasWidget();
if (canvasWidget) {
#ifdef HAVE_OPENGL
if (qobject_cast<QOpenGLWidget*>(canvasWidget) != 0) {
isCanvasOpenGL = true;
}
#endif
}
if (!isCanvasOpenGL) {
......
......@@ -367,7 +367,6 @@ if(WIN32)
)
include_directories(${Qt5Gui_PRIVATE_INCLUDE_DIRS})
endif()
if (HAVE_OPENGL)
set(kritaui_LIB_SRCS
${kritaui_LIB_SRCS}
kis_animation_frame_cache.cpp
......@@ -376,7 +375,6 @@ if (HAVE_OPENGL)
kis_animation_exporter.cpp
kis_animation_importer.cpp
)
endif()
if(UNIX)
set(kritaui_LIB_SRCS
......@@ -499,15 +497,11 @@ if(APPLE)
endif ()
if(HAVE_OPENEXR)
target_link_libraries(kritaui ${OPENEXR_LIBRARIES})
endif()
target_link_libraries(kritaui ${OPENEXR_LIBRARIES})
if(HAVE_OPENGL)
# Add VSync disable workaround
if(NOT WIN32 AND NOT APPLE)
target_link_libraries(kritaui ${CMAKE_DL_LIBS} Qt5::X11Extras)
endif()
# Add VSync disable workaround
if(NOT WIN32 AND NOT APPLE)
target_link_libraries(kritaui ${CMAKE_DL_LIBS} Qt5::X11Extras)
endif()
if(X11_FOUND)
......
......@@ -82,9 +82,7 @@
#include <kis_resource_server_provider.h>
#include <KoResourceServerProvider.h>
#ifdef HAVE_OPENGL
#include "opengl/kis_opengl.h"
#endif
#include <CalligraVersionWrapper.h>
......@@ -169,29 +167,7 @@ KisApplication::KisApplication(const QString &key, int &argc, char **argv)
}
}
#ifdef HAVE_OPENGL
KisOpenGL::initialize();
/**
* Warn about Intel's broken video drivers
*/
#if defined HAVE_OPENGL && defined Q_OS_WIN
KisConfig cfg;
QString renderer = KisOpenGL::renderer();
if (cfg.useOpenGL() && renderer.startsWith("Intel") && !cfg.readEntry("WarnedAboutIntel", false)) {
QMessageBox::information(0,
i18nc("@title:window", "Krita: Warning"),
i18n("You have an Intel(R) HD Graphics video adapter.\n"
"If you experience problems like a black or blank screen,"
"please update your display driver to the latest version.\n\n"
"You can also disable OpenGL rendering in Krita's Settings.\n"));
cfg.writeEntry("WarnedAboutIntel", true);
}
#endif
#endif
}
#if defined(Q_OS_WIN) && defined(ENV32BIT)
......
......@@ -130,13 +130,10 @@
#include "KisView.h"
#include "KisViewManager.h"
#include "thememanager.h"
#ifdef HAVE_OPENGL
#include "kis_animation_importer.h"
#include "dialogs/kis_dlg_import_image_sequence.h"
#include "kis_animation_exporter.h"
#endif
class ToolDockerFactory : public KoDockFactoryBase
{
public:
......@@ -234,10 +231,8 @@ public:
KisAction *printAction;
KisAction *printActionPreview;
KisAction *exportPdf;
#ifdef HAVE_OPENGL
KisAction *importAnimation;
KisAction *exportAnimation;
#endif
KisAction *closeAll;
// KisAction *reloadFile;
KisAction *importFile;
......@@ -1617,7 +1612,6 @@ KisPrintJob* KisMainWindow::exportToPdf(KoPageLayout pageLayout, QString pdfFile
void KisMainWindow::importAnimation()
{
#ifdef HAVE_OPENGL
if (!activeView()) return;
KisDocument *document = activeView()->document();
......@@ -1645,12 +1639,10 @@ void KisMainWindow::importAnimation()
}
activeView()->canvasBase()->refetchDataFromImage();
}
#endif
}
void KisMainWindow::exportAnimation()
{
#ifdef HAVE_OPENGL
if (!activeView()) return;
KisDocument *document = activeView()->document();
......@@ -1670,7 +1662,6 @@ void KisMainWindow::exportAnimation()
QMessageBox::critical(0, i18nc("@title:window", "Krita"), i18n("Could not finish export animation:\n%1", msg));
}
activeView()->canvasBase()->refetchDataFromImage();
#endif
}
void KisMainWindow::slotConfigureToolbars()
......@@ -2285,13 +2276,11 @@ void KisMainWindow::createActions()
d->exportPdf = actionManager->createAction("file_export_pdf");
connect(d->exportPdf, SIGNAL(triggered()), this, SLOT(exportToPdf()));
#ifdef HAVE_OPENGL
d->importAnimation = actionManager->createAction("file_import_animation");
connect(d->importAnimation, SIGNAL(triggered()), this, SLOT(importAnimation()));
d->exportAnimation = actionManager->createAction("file_export_animation");
connect(d->exportAnimation, SIGNAL(triggered()), this, SLOT(exportAnimation()));
#endif
d->closeAll = actionManager->createAction("file_close_all");
connect(d->closeAll, SIGNAL(triggered()), this, SLOT(slotFileCloseAll()));
......
......@@ -65,9 +65,7 @@
#include "kis_config.h"
#include "kis_shape_controller.h"
#include "kis_resource_server_provider.h"
#ifdef HAVE_OPENGL
#include "kis_animation_cache_populator.h"
#endif
#include "kis_idle_watcher.h"
#include "kis_image.h"
#include "KisImportExportManager.h"
......@@ -90,9 +88,7 @@ public:
Private(KisPart *_part)
: part(_part)
, idleWatcher(2500)
#ifdef HAVE_OPENGL
, animationCachePopulator(_part)
#endif
{
}
......@@ -111,9 +107,7 @@ public:
KActionCollection *actionCollection{0};
KisIdleWatcher idleWatcher;
#ifdef HAVE_OPENGL
KisAnimationCachePopulator animationCachePopulator;
#endif
void loadActions();
};
......@@ -153,12 +147,10 @@ KisPart::KisPart()
connect(KisActionRegistry::instance(), SIGNAL(shortcutsUpdated()),
this, SLOT(updateShortcuts()));
#ifdef HAVE_OPENGL
connect(&d->idleWatcher, SIGNAL(startedIdleMode()),
&d->animationCachePopulator, SLOT(slotRequestRegeneration()));
d->animationCachePopulator.slotRequestRegeneration();
#endif
}
KisPart::~KisPart()
......@@ -380,12 +372,10 @@ KisIdleWatcher* KisPart::idleWatcher() const
return &d->idleWatcher;
}
#ifdef HAVE_OPENGL
KisAnimationCachePopulator* KisPart::cachePopulator() const
{
return &d->animationCachePopulator;
}
#endif
void KisPart::openExistingFile(const QUrl &url)
{
......
......@@ -40,9 +40,7 @@ class KisView;
class QGraphicsItem;
class KisDocument;
class KisIdleWatcher;
#ifdef HAVE_OPENGL
class KisAnimationCachePopulator;
#endif
/**
* KisPart is the Great Deku Tree of Krita.
......@@ -145,12 +143,12 @@ public:
* @return the application-wide KisIdleWatcher.
*/
KisIdleWatcher *idleWatcher() const;
#ifdef HAVE_OPENGL
/**
* @return the application-wide AnimationCachePopulator.
*/
KisAnimationCachePopulator *cachePopulator() const;
#endif
public Q_SLOTS:
......
......@@ -68,12 +68,9 @@
#include "kis_canvas_controller.h"
#include "kis_grid_config.h"
#ifdef HAVE_OPENGL
#include "kis_animation_player.h"
#include "kis_animation_frame_cache.h"
#include "opengl/kis_opengl_canvas2.h"
#endif
#include "opengl/kis_opengl.h"
#include "kis_fps_decoration.h"
......@@ -104,9 +101,7 @@ public:
KisAbstractCanvasWidget *canvasWidget = 0;
KoShapeManager shapeManager;
bool currentCanvasIsOpenGL;
#ifdef HAVE_OPENGL
int openGLFilterMode;
#endif
KisToolProxy toolProxy;
KisPrescaledProjectionSP prescaledProjection;
bool vastScrolling;
......@@ -120,10 +115,8 @@ public:
KisDisplayColorConverter displayColorConverter;
KisCanvasUpdatesCompressor projectionUpdatesCompressor;
#ifdef HAVE_OPENGL
KisAnimationPlayer *animationPlayer;
KisAnimationFrameCacheSP frameCache;
#endif
bool lodAllowedInCanvas;
bool bootsrapLodBlocked;
......@@ -160,9 +153,7 @@ void KisCanvas2::setup()
createCanvas(cfg.useOpenGL());
setLodAllowedInCanvas(m_d->lodAllowedInCanvas);
#ifdef HAVE_OPENGL
m_d->animationPlayer = new KisAnimationPlayer(this);
#endif
connect(m_d->view->canvasController()->proxyObject, SIGNAL(moveDocumentOffset(QPoint)), SLOT(documentOffsetMoved(QPoint)));
connect(KisConfigNotifier::instance(), SIGNAL(configChanged()), SLOT(slotConfigChanged()));
......@@ -195,11 +186,9 @@ void KisCanvas2::setup()
KisCanvas2::~KisCanvas2()
{
#ifdef HAVE_OPENGL
if (m_d->animationPlayer->isPlaying()) {
m_d->animationPlayer->forcedStopOnExit();
}
#endif
delete m_d;
}
......@@ -250,12 +239,11 @@ bool KisCanvas2::canvasIsOpenGL() const
return m_d->currentCanvasIsOpenGL;
}
#ifdef HAVE_OPENGL
KisOpenGL::FilterMode KisCanvas2::openGLFilterMode() const
{
return KisOpenGL::FilterMode(m_d->openGLFilterMode);
}
#endif
void KisCanvas2::gridSize(QPointF *offset, QSizeF *spacing) const
{
QTransform transform = coordinatesConverter()->imageToDocumentTransform();
......@@ -409,7 +397,6 @@ void KisCanvas2::createQPainterCanvas()
void KisCanvas2::createOpenGLCanvas()
{
#ifdef HAVE_OPENGL
KisConfig cfg;
m_d->openGLFilterMode = cfg.openGLFilteringMode();
m_d->currentCanvasIsOpenGL = true;
......@@ -422,18 +409,13 @@ void KisCanvas2::createOpenGLCanvas()
if (canvasWidget->needsFpsDebugging() && !decoration(KisFpsDecoration::idTag)) {
addDecoration(new KisFpsDecoration(imageView()));
}
#else
qFatal("Bad use of createOpenGLCanvas(). It shouldn't have happened =(");
#endif
}
void KisCanvas2::createCanvas(bool useOpenGL)
{
// deinitialize previous canvas structures
m_d->prescaledProjection = 0;
#ifdef HAVE_OPENGL
m_d->frameCache = 0;
#endif
KisConfig cfg;
QDesktopWidget dw;
......@@ -441,7 +423,6 @@ void KisCanvas2::createCanvas(bool useOpenGL)
m_d->displayColorConverter.setMonitorProfile(profile);
if (useOpenGL) {
#ifdef HAVE_OPENGL
if (KisOpenGL::hasOpenGL()) {
createOpenGLCanvas();
if (cfg.canvasState() == "OPENGL_FAILED") {
......@@ -453,13 +434,11 @@ void KisCanvas2::createCanvas(bool useOpenGL)
warnKrita << "Tried to create OpenGL widget when system doesn't have OpenGL\n";
createQPainterCanvas();
}
#else
warnKrita << "User requested an OpenGL canvas, but Krita was compiled without OpenGL support. Falling back to QPainter.";
createQPainterCanvas();
#endif
} else {
}
else {
createQPainterCanvas();
}
if (m_d->popupPalette) {
m_d->popupPalette->setParent(m_d->canvasWidget->widget());
}
......@@ -502,7 +481,6 @@ void KisCanvas2::resetCanvas(bool useOpenGL)
if (!m_d->canvasWidget) {
return;
}
#ifdef HAVE_OPENGL
KisConfig cfg;
bool needReset = (m_d->currentCanvasIsOpenGL != useOpenGL) ||
(m_d->currentCanvasIsOpenGL &&
......@@ -513,10 +491,6 @@ void KisCanvas2::resetCanvas(bool useOpenGL)
connectCurrentCanvas();
notifyZoomChanged();
}
#else
Q_UNUSED(useOpenGL)
#endif
updateCanvasWidgetImpl();
}
......@@ -814,7 +788,6 @@ void KisCanvas2::setCursor(const QCursor &cursor)
canvasWidget()->setCursor(cursor);
}
#ifdef HAVE_OPENGL
KisAnimationFrameCacheSP KisCanvas2::frameCache() const
{
return m_d->frameCache;
......@@ -824,7 +797,7 @@ KisAnimationPlayer *KisCanvas2::animationPlayer() const
{
return m_d->animationPlayer;
}
#endif
void KisCanvas2::slotSelectionChanged()
{
KisShapeLayer* shapeLayer = dynamic_cast<KisShapeLayer*>(viewManager()->activeLayer().data());
......@@ -879,17 +852,11 @@ void KisCanvas2::bootstrapFinished()
void KisCanvas2::setLodAllowedInCanvas(bool value)
{
#ifdef HAVE_OPENGL
m_d->lodAllowedInCanvas =
value &&
m_d->currentCanvasIsOpenGL &&
(m_d->openGLFilterMode == KisOpenGL::TrilinearFilterMode ||
m_d->openGLFilterMode == KisOpenGL::HighQualityFiltering);
#else
Q_UNUSED(value);
m_d->lodAllowedInCanvas = false;
#endif
KisImageSP image = this->image();
if (m_d->effectiveLodAllowedInCanvas() != !image->levelOfDetailBlocked()) {
......
......@@ -32,9 +32,7 @@
#include <kis_types.h>
#include <KoPointerEvent.h>
#ifdef HAVE_OPENGL
#include "opengl/kis_opengl.h"
#endif
#include "kis_ui_types.h"
#include "kis_coordinates_converter.h"
......@@ -87,9 +85,7 @@ public: // KoCanvasBase implementation
bool canvasIsOpenGL() const;
#ifdef HAVE_OPENGL
KisOpenGL::FilterMode openGLFilterMode() const;
#endif
void gridSize(QPointF *offset, QSizeF *spacing) const;
......@@ -171,10 +167,8 @@ public: // KisCanvas2 methods
KisExposureGammaCorrectionInterface* exposureGammaCorrectionInterface() const;
void setCursor(const QCursor &cursor);
#ifdef HAVE_OPENGL
KisAnimationFrameCacheSP frameCache() const;
KisAnimationPlayer *animationPlayer() const;
#endif
void refetchDataFromImage();
Q_SIGNALS:
......
......@@ -271,7 +271,6 @@ void KisCanvasController::slotToggleLevelOfDetailMode(bool value)
if (!kritaCanvas->canvasIsOpenGL()) {
reason = i18n("Instant Preview is only supported with OpenGL activated");
}
#ifdef HAVE_OPENGL
else if (kritaCanvas->openGLFilterMode() == KisOpenGL::BilinearFilterMode ||
kritaCanvas->openGLFilterMode() == KisOpenGL::NearestFilterMode) {
QString filteringMode =
......@@ -279,7 +278,6 @@ void KisCanvasController::slotToggleLevelOfDetailMode(bool value)
i18n("Bilinear") : i18n("Nearest Neighbour");
reason = i18n("Instant Preview is supported\n in Trilinear of High Quality filtering modes.\nCurrent mode is %1", filteringMode);
}
#endif
m_d->view->viewManager()->showFloatingMessage(
i18n("Failed activating Instant Preview mode!\n\n%1", reason),
......
......@@ -20,10 +20,7 @@
#include <QObject>
#include <KoConfig.h> // for HAVE_OPENGL
#ifdef HAVE_OPENGL
#include <qopengl.h>
#endif
#include <kritaui_export.h>
......@@ -39,10 +36,8 @@ class KRITAUI_EXPORT KisDisplayFilter : public QObject
public:
explicit KisDisplayFilter(QObject *parent = 0);
#ifdef HAVE_OPENGL
virtual QString program() const = 0;
virtual GLuint lutTexture() const = 0;
#endif
virtual void filter(quint8 *pixels, quint32 numPixels) = 0;
virtual void approximateInverseTransformation(quint8 *pixels, quint32 numPixels) = 0;
virtual void approximateForwardTransformation(quint8 *pixels, quint32 numPixels) = 0;
......
......@@ -25,10 +25,8 @@
#include <QToolButton>
#include <QApplication>
#include <QPaintEngine>
#ifdef HAVE_OPENGL
#include <QOpenGLContext>
#include <QOpenGLFunctions>
#endif
#include <kis_icon.h>
......@@ -151,7 +149,6 @@ void KisMirrorAxis::drawDecoration(QPainter& gc, const QRectF& updateArea, const
gc.setBrush(Qt::white);
gc.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform);
#if defined(HAVE_OPENGL)
QOpenGLContext *ctx = QOpenGLContext::currentContext();
bool hasMultisample = ((gc.paintEngine()->type() == QPaintEngine::OpenGL2) &&
(ctx->hasExtension("GL_ARB_multisample")));
......@@ -163,7 +160,6 @@ void KisMirrorAxis::drawDecoration(QPainter& gc, const QRectF& updateArea, const
ctx->functions()->glEnable(GL_MULTISAMPLE);
gc.endNativePainting();
}
#endif
float halfHandleSize = d->handleSize / 2;
......@@ -217,13 +213,12 @@ void KisMirrorAxis::drawDecoration(QPainter& gc, const QRectF& updateArea, const
}
}
#if defined(HAVE_OPENGL)
if (hasMultisample) {
gc.beginNativePainting();
ctx->functions()->glDisable(GL_MULTISAMPLE);
gc.endNativePainting();
}
#endif
}
bool KisMirrorAxis::eventFilter(QObject* target, QEvent* event)
......
/*
* Copyright (c) 2010, Dmitry Kazakov <dimula73@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "kis_update_info.h"
/**
......@@ -33,8 +50,6 @@ QRect KisPPUpdateInfo::dirtyImageRect() const {
return dirtyImageRectVar;
}
#ifdef HAVE_OPENGL
KisOpenGLUpdateInfo::KisOpenGLUpdateInfo(ConversionOptions options)
: m_options(options)
{
......@@ -70,4 +85,3 @@ void KisOpenGLUpdateInfo::convertColorSpace()
}
}
#endif /* HAVE_OPENGL */
......@@ -24,7 +24,7 @@
#include "kis_image_patch.h"
#include "kis_shared.h"
#include "kritaui_export.h"
#include <KoConfig.h> // for HAVE_OPENGL
#include "opengl/kis_texture_tile_update_info.h"
#include "kis_ui_types.h"
......@@ -40,8 +40,6 @@ public:
Q_DECLARE_METATYPE(KisUpdateInfoSP)
#ifdef HAVE_OPENGL
#include "opengl/kis_texture_tile_update_info.h"
struct ConversionOptions {
ConversionOptions() : m_needsConversion(false) {}
......@@ -84,7 +82,7 @@ private:
QRect m_dirtyImageRect;
ConversionOptions m_options;
};
#endif /* HAVE_OPENGL */
class KisPPUpdateInfo : public KisUpdateInfo
{
......
......@@ -685,7 +685,6 @@ DisplaySettingsTab::DisplaySettingsTab(QWidget *parent, const char *name)
{
KisConfig cfg;
#ifdef HAVE_OPENGL
if (!KisOpenGL::hasOpenGL()) {
grpOpenGL->setEnabled(false);
grpOpenGL->setChecked(false);
......@@ -711,10 +710,6 @@ DisplaySettingsTab::DisplaySettingsTab(QWidget *parent, const char *name)
grpOpenGL->setVisible(false);
grpOpenGL->setMaximumHeight(0);
}
#else
grpOpenGL->setEnabled(false);
grpOpenGL->setChecked(false);
#endif
KoColor c;
c.fromQColor(cfg.selectionOverlayMaskColor());
......@@ -741,7 +736,6 @@ DisplaySettingsTab::DisplaySettingsTab(QWidget *parent, const char *name)
void DisplaySettingsTab::setDefault()
{
KisConfig cfg;
#ifdef HAVE_OPENGL
if (!KisOpenGL::hasOpenGL()) {
grpOpenGL->setEnabled(false);
grpOpenGL->setChecked(false);
......@@ -762,10 +756,6 @@ void DisplaySettingsTab::setDefault()
cmbFilterMode->setEnabled(true);
cmbFilterMode->setCurrentIndex(cfg.openGLFilteringMode(true));
}
#else