Skip to content

Commit

Permalink
Embedded R Tweaks
Browse files Browse the repository at this point in the history
.. Hi-dpi support fixes use of OpenGL acceleration
.. Added a bit of debug on startup (when GC_WANT_ALLDEBUG is set)
  • Loading branch information
liversedge committed May 1, 2017
1 parent 725f4ef commit ed21fb7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Charts/RCanvas.cpp
Expand Up @@ -52,8 +52,8 @@ RCanvas::RCanvas(Context *context, QWidget *parent) : QGraphicsView(parent), con

#ifdef Q_OS_LINUX // mac and windows both have issues. sigh.
//disabled for now as Linux also has issues on High DPI screen
//setViewport(new QGLWidget( QGLFormat(QGL::SampleBuffers)));
//setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
setViewport(new QGLWidget( QGLFormat(QGL::SampleBuffers)));
setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
#endif

// allow to click and drag
Expand Down
1 change: 1 addition & 0 deletions src/R/RLibrary.cpp
Expand Up @@ -456,5 +456,6 @@ RLibrary::load()
// sadly, there is no standard place on windows
setenv("R_HOME", home.toLatin1().constData(), true);
}

return loaded;
}
5 changes: 5 additions & 0 deletions src/R/RTool.cpp
Expand Up @@ -154,6 +154,11 @@ RTool::RTool()
if (exp.exactMatch(strings[1])) version = exp.cap(1);
else version = strings[1];
}

// what version are we running?
#ifdef GC_WANT_ALLDEBUG
fprintf(stderr,"R loaded. [Compiled=%s.%s, Loaded=%s, Loaded DeviceEngine=%d]\n", R_MAJOR, R_MINOR, version.toStdString().c_str(), GC_R_GE_getVersion());
#endif
rtool->messages.clear();

// load the dynamix library and create function wrapper
Expand Down

0 comments on commit ed21fb7

Please sign in to comment.