cmake HAS_GL option, by default true, affect graphic and qglview
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user