GLES fixes.

This commit is contained in:
Leonardo Zide 2020-11-06 19:01:21 -08:00
parent f8ca2b848b
commit 0902c18426

View file

@ -74,12 +74,14 @@ lcQPreferencesDialog::lcQPreferencesDialog(QWidget* Parent, lcPreferencesDialogO
ui->antiAliasingSamples->setCurrentIndex(0);
ui->edgeLines->setChecked(mOptions->Preferences.mDrawEdgeLines);
#ifndef LC_OPENGLES
if (QGLFormat::defaultFormat().sampleBuffers() && QGLFormat::defaultFormat().samples() > 1)
{
glGetFloatv(GL_SMOOTH_LINE_WIDTH_RANGE, mLineWidthRange);
glGetFloatv(GL_SMOOTH_LINE_WIDTH_GRANULARITY, &mLineWidthGranularity);
}
else
#endif
{
glGetFloatv(GL_ALIASED_LINE_WIDTH_RANGE, mLineWidthRange);
mLineWidthGranularity = 1.0f;