mirror of
https://github.com/leozide/leocad
synced 2024-11-17 07:47:55 +01:00
Disable lighting on machines that don't support shaders.
This commit is contained in:
parent
8da318037d
commit
219f9635db
2 changed files with 6 additions and 1 deletions
|
@ -97,6 +97,9 @@ lcQGLWidget::lcQGLWidget(QWidget *parent, lcGLWidget *owner, bool view)
|
|||
lcContext::CreateResources();
|
||||
View::CreateResources(widget->mContext);
|
||||
|
||||
if (!gSupportsShaderObjects)
|
||||
lcGetPreferences().mLightingMode = LC_LIGHTING_UNLIT;
|
||||
|
||||
gPlaceholderMesh = new lcMesh;
|
||||
gPlaceholderMesh->CreateBox();
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include "lc_library.h"
|
||||
#include "lc_application.h"
|
||||
#include "lc_qutils.h"
|
||||
#include "lc_glextensions.h"
|
||||
#include "pieceinf.h"
|
||||
|
||||
lcQPreferencesDialog::lcQPreferencesDialog(QWidget *parent, void *data) :
|
||||
|
@ -46,7 +47,8 @@ lcQPreferencesDialog::lcQPreferencesDialog(QWidget *parent, void *data) :
|
|||
ui->gridLines->setChecked(options->Preferences.mDrawGridLines);
|
||||
ui->gridLineSpacing->setText(QString::number(options->Preferences.mGridLineSpacing));
|
||||
ui->axisIcon->setChecked(options->Preferences.mDrawAxes);
|
||||
ui->enableLighting->setChecked(options->Preferences.mLightingMode != LC_LIGHTING_UNLIT);
|
||||
ui->enableLighting->setChecked(options->Preferences.mLightingMode != LC_LIGHTING_UNLIT && gSupportsShaderObjects);
|
||||
ui->enableLighting->setEnabled(gSupportsShaderObjects);
|
||||
|
||||
QPixmap pix(12, 12);
|
||||
|
||||
|
|
Loading…
Reference in a new issue