mirror of
https://github.com/leozide/leocad
synced 2025-01-14 08:01:45 +01:00
Fixed MSAA check.
This commit is contained in:
parent
0499e055e1
commit
985fb8b778
2 changed files with 4 additions and 2 deletions
|
@ -568,7 +568,7 @@ lcFramebuffer lcContext::CreateFramebuffer(int Width, int Height, bool Depth, bo
|
|||
#endif
|
||||
{
|
||||
#ifdef LC_USE_QOPENGLWIDGET
|
||||
int Samples = (Multisample && gSupportsTexImage2DMultisample) ? QSurfaceFormat::defaultFormat().samples() : 1;
|
||||
int Samples = (Multisample && gSupportsTexImage2DMultisample && QSurfaceFormat::defaultFormat().samples() > 1) ? QSurfaceFormat::defaultFormat().samples() : 1;
|
||||
#else
|
||||
int Samples = (Multisample && gSupportsTexImage2DMultisample && QGLFormat::defaultFormat().sampleBuffers()) ? QGLFormat::defaultFormat().samples() : 1;
|
||||
#endif
|
||||
|
|
|
@ -724,7 +724,9 @@ bool lcView::BeginRenderToImage(int Width, int Height)
|
|||
|
||||
MaxTexture = qMin(MaxTexture, 2048);
|
||||
#ifdef LC_USE_QOPENGLWIDGET
|
||||
MaxTexture /= QSurfaceFormat::defaultFormat().samples();
|
||||
const int Samples = QSurfaceFormat::defaultFormat().samples();
|
||||
if (Samples > 1)
|
||||
MaxTexture /= Samples;
|
||||
#else
|
||||
MaxTexture /= QGLFormat::defaultFormat().sampleBuffers() ? QGLFormat::defaultFormat().samples() : 1;
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue