mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-24 11:45:53 +01:00
Large areas (polygons) require a stencil buffer when drawn using OpenGL
This commit is contained in:
parent
4daa9fd55c
commit
82923a4529
@ -51,7 +51,7 @@ App::App(int &argc, char **argv) : QApplication(argc, argv)
|
||||
"QThreadStorage: Thread X exited after QThreadStorage Y destroyed" */
|
||||
Downloader::setNetworkManager(new QNetworkAccessManager(this));
|
||||
DEM::setDir(ProgramPaths::demDir());
|
||||
OPENGL_SET_SAMPLES(4);
|
||||
OPENGL_SET_FORMAT(4, 8);
|
||||
|
||||
loadDatums();
|
||||
loadPCSs();
|
||||
|
@ -14,13 +14,15 @@
|
||||
#endif
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0)
|
||||
#define OPENGL_SET_SAMPLES(samples) \
|
||||
#define OPENGL_SET_FORMAT(samples, stencilBuffer) \
|
||||
{QGLFormat fmt; \
|
||||
fmt.setStencilBufferSize(stencilBuffer); \
|
||||
fmt.setSamples(samples); \
|
||||
QGLFormat::setDefaultFormat(fmt);}
|
||||
#else
|
||||
#define OPENGL_SET_SAMPLES(samples) \
|
||||
#define OPENGL_SET_FORMAT(samples, stencilBuffer) \
|
||||
{QSurfaceFormat fmt; \
|
||||
fmt.setStencilBufferSize(stencilBuffer); \
|
||||
fmt.setSamples(samples); \
|
||||
QSurfaceFormat::setDefaultFormat(fmt);}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user