[Kst] branches/work/kst/portto4/kst/src/libkstapp

Adam Treat treat at kde.org
Wed Jun 6 18:52:46 CEST 2007


SVN commit 672288 by treat:

* QGLWidget is not degrading gracefully here...


 M  +5 -1      applicationsettings.cpp  
 M  +0 -1      applicationsettings.h  
 M  +1 -0      view.cpp  


--- branches/work/kst/portto4/kst/src/libkstapp/applicationsettings.cpp #672287:672288
@@ -12,6 +12,7 @@
 #include "applicationsettings.h"
 
 #include <QCoreApplication>
+#include <QGLPixelBuffer>
 
 namespace Kst {
 
@@ -32,7 +33,10 @@
 
 
 ApplicationSettings::ApplicationSettings() {
-  _useOpenGL = true;
+  //FIXME Not sure if this is the best test for hardware acceleration
+  // but right now opening with QGV with QGLWidget as viewport takes
+  // several seconds delay when opening application on my system.
+  _useOpenGL = QGLPixelBuffer::hasOpenGLPbuffers();
 }
 
 
--- branches/work/kst/portto4/kst/src/libkstapp/applicationsettings.h #672287:672288
@@ -12,7 +12,6 @@
 #ifndef APPLICATIONSETTINGS_H
 #define APPLICATIONSETTINGS_H
 
-
 namespace Kst {
 
 class ApplicationSettings
--- branches/work/kst/portto4/kst/src/libkstapp/view.cpp #672287:672288
@@ -33,6 +33,7 @@
   setInteractive(true);
   setRenderHints(QPainter::Antialiasing | QPainter::TextAntialiasing | QPainter::SmoothPixmapTransform);
   if (ApplicationSettings::self()->useOpenGL()) {
+    setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
     setViewport(new QGLWidget);
   }
 }


More information about the Kst mailing list