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" */
|
"QThreadStorage: Thread X exited after QThreadStorage Y destroyed" */
|
||||||
Downloader::setNetworkManager(new QNetworkAccessManager(this));
|
Downloader::setNetworkManager(new QNetworkAccessManager(this));
|
||||||
DEM::setDir(ProgramPaths::demDir());
|
DEM::setDir(ProgramPaths::demDir());
|
||||||
OPENGL_SET_SAMPLES(4);
|
OPENGL_SET_FORMAT(4, 8);
|
||||||
|
|
||||||
loadDatums();
|
loadDatums();
|
||||||
loadPCSs();
|
loadPCSs();
|
||||||
|
@ -14,13 +14,15 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0)
|
#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0)
|
||||||
#define OPENGL_SET_SAMPLES(samples) \
|
#define OPENGL_SET_FORMAT(samples, stencilBuffer) \
|
||||||
{QGLFormat fmt; \
|
{QGLFormat fmt; \
|
||||||
|
fmt.setStencilBufferSize(stencilBuffer); \
|
||||||
fmt.setSamples(samples); \
|
fmt.setSamples(samples); \
|
||||||
QGLFormat::setDefaultFormat(fmt);}
|
QGLFormat::setDefaultFormat(fmt);}
|
||||||
#else
|
#else
|
||||||
#define OPENGL_SET_SAMPLES(samples) \
|
#define OPENGL_SET_FORMAT(samples, stencilBuffer) \
|
||||||
{QSurfaceFormat fmt; \
|
{QSurfaceFormat fmt; \
|
||||||
|
fmt.setStencilBufferSize(stencilBuffer); \
|
||||||
fmt.setSamples(samples); \
|
fmt.setSamples(samples); \
|
||||||
QSurfaceFormat::setDefaultFormat(fmt);}
|
QSurfaceFormat::setDefaultFormat(fmt);}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user