1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-20 10:54:14 +01:00

Merged in filnet/librepilot/filnet/LP-29_osgearth_integration (pull request #194)

Filnet/lp 29_osgearth_integration
This commit is contained in:
Fredrik Arvidsson 2016-03-20 11:09:55 +01:00
commit 4f5dd7117c
2 changed files with 7 additions and 5 deletions

View File

@ -60,7 +60,6 @@ osg:win32 {
libnettle-6-1.dll \
libssh2-1.dll
# other
OSG_LIBS += \
libproj-9.dll \
@ -69,7 +68,6 @@ osg:win32 {
libiconv-2.dll \
zlib1.dll
# osg libraries
OSG_LIBS += \
libOpenThreads$${DS}.dll \
@ -190,6 +188,7 @@ osgearth:win32 {
libgeos_c.dll \
libgeos.dll \
libjpeg-8.dll \
libopenjp2-7.dll \
libtiff-5.dll \
liblzma-5.dll

View File

@ -398,8 +398,10 @@ public:
traits->windowDecoration = false;
traits->x = 0;
traits->y = 0;
traits->width = self->width();
traits->height = self->height();
int dpr = self->window()->devicePixelRatio();
traits->width = self->width() * dpr;
traits->height = self->height() * dpr;
traits->alpha = ds->getMinimumNumAlphaBits();
traits->stencil = ds->getMinimumNumStencilBits();
@ -505,7 +507,8 @@ public:
osg::Viewport *viewport = h->view->getCamera()->getViewport();
if ((viewport->width() != item->width()) || (viewport->height() != item->height())) {
needToDoFrame = true;
h->view->getCamera()->getGraphicsContext()->resized(0, 0, item->width(), item->height());
int dpr = h->self->window()->devicePixelRatio();
h->view->getCamera()->getGraphicsContext()->resized(0, 0, item->width() * dpr, item->height() * dpr);
}
if (!needToDoFrame) {