1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-19 04:52:12 +01:00

LP-29 don't take device pixel ratio into account

This commit is contained in:
Philippe Renon 2015-12-02 23:09:38 +01:00
parent a4f8380c13
commit 2f18791a43

View File

@ -531,7 +531,12 @@ public:
QOpenGLFramebufferObjectFormat format; QOpenGLFramebufferObjectFormat format;
format.setAttachment(QOpenGLFramebufferObject::CombinedDepthStencil); format.setAttachment(QOpenGLFramebufferObject::CombinedDepthStencil);
// format.setSamples(4); // format.setSamples(4);
int dpr = h->self->window()->devicePixelRatio();
// Keeping this for reference :
// Mac need(ed) to have devicePixelRatio (dpr) taken into account (i.e. dpr = 2).
// Further tests on Mac have shown that although dpr is still 2 it should not be used to scale the fbo.
// Note that getting the window to get the devicePixelRatio is not great (messing with windows is often a bad idea...)
int dpr = 1; // h->self->window()->devicePixelRatio();
QOpenGLFramebufferObject *fbo = new QOpenGLFramebufferObject(size.width() / dpr, size.height() / dpr, format); QOpenGLFramebufferObject *fbo = new QOpenGLFramebufferObject(size.width() / dpr, size.height() / dpr, format);
return fbo; return fbo;