cmake HAS_GL option, by default true, affect graphic and qglview

This commit is contained in:
2021-04-23 00:21:50 +03:00
parent 36a567dbeb
commit 159f0dd6c7
4 changed files with 20 additions and 4 deletions

View File

@@ -15,7 +15,9 @@
# include <QRandomGenerator>
#endif
#ifndef Q_OS_ANDROID
# define HAS_GL
# ifndef FORCE_NO_GL
# define HAS_GL
# endif
#endif
#ifdef HAS_GL
# ifndef GL_MULTISAMPLE
@@ -361,7 +363,7 @@ void Graphic::canvasPaintEvent() {
if (grid)
drawGrid();
p.setRenderHint(QPainter::Antialiasing, aalias);
#ifndef ANDROID
#ifdef HAS_GL
if (isOGL) {
if (aalias) glEnable(GL_MULTISAMPLE);
else glDisable(GL_MULTISAMPLE);
@@ -1627,6 +1629,10 @@ void Graphic::on_graphic_buttonConfigure_clicked() {
conf->ui->comboStyleGrid->setCurrentIndex((int)grid_pen.style());
conf->ui->spinWidthGrid->setValue(grid_pen.widthF());
conf->ui->checkOGL->setChecked(isOGL);
#ifndef HAS_GL
conf->ui->checkOGL->setEnabled(false);
conf->ui->checkOGL->setChecked(false);
#endif
conf->ui->checkAAlias->setChecked(aalias);
conf->ui->checkInputs->setChecked(borderInputsVisible());
conf->ui->checkStatus->setChecked(statusVisible());