mirror of
https://github.com/leozide/leocad
synced 2025-01-29 20:34:50 +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
|
#endif
|
||||||
{
|
{
|
||||||
#ifdef LC_USE_QOPENGLWIDGET
|
#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
|
#else
|
||||||
int Samples = (Multisample && gSupportsTexImage2DMultisample && QGLFormat::defaultFormat().sampleBuffers()) ? QGLFormat::defaultFormat().samples() : 1;
|
int Samples = (Multisample && gSupportsTexImage2DMultisample && QGLFormat::defaultFormat().sampleBuffers()) ? QGLFormat::defaultFormat().samples() : 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -724,7 +724,9 @@ bool lcView::BeginRenderToImage(int Width, int Height)
|
||||||
|
|
||||||
MaxTexture = qMin(MaxTexture, 2048);
|
MaxTexture = qMin(MaxTexture, 2048);
|
||||||
#ifdef LC_USE_QOPENGLWIDGET
|
#ifdef LC_USE_QOPENGLWIDGET
|
||||||
MaxTexture /= QSurfaceFormat::defaultFormat().samples();
|
const int Samples = QSurfaceFormat::defaultFormat().samples();
|
||||||
|
if (Samples > 1)
|
||||||
|
MaxTexture /= Samples;
|
||||||
#else
|
#else
|
||||||
MaxTexture /= QGLFormat::defaultFormat().sampleBuffers() ? QGLFormat::defaultFormat().samples() : 1;
|
MaxTexture /= QGLFormat::defaultFormat().sampleBuffers() ? QGLFormat::defaultFormat().samples() : 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue