From 6c0ec6051464196fdc45c1b74cb380a9659fc6f4 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 28 Apr 2009 11:24:33 +0200 Subject: =?UTF-8?q?Fixed=20Compile=20after=20removal=20of=20D3D.=20Reviewe?= =?UTF-8?q?d-by:=20Trond=20Kjern=C3=A5sen=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- demos/qtdemo/colors.cpp | 7 +++---- demos/qtdemo/colors.h | 2 +- demos/qtdemo/mainwindow.cpp | 7 ++++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/demos/qtdemo/colors.cpp b/demos/qtdemo/colors.cpp index bc16296..733b285 100644 --- a/demos/qtdemo/colors.cpp +++ b/demos/qtdemo/colors.cpp @@ -73,7 +73,7 @@ int Colors::contentHeight = 510; // Properties: bool Colors::openGlRendering = false; bool Colors::softwareRendering = false; -bool Colors::openGlAwailable = true; +bool Colors::openGlAvailable = true; bool Colors::xRenderPresent = true; bool Colors::noTicker = false; @@ -286,7 +286,6 @@ void Colors::parseArgs(int argc, char *argv[]) void Colors::setLowSettings() { Colors::openGlRendering = false; - Colors::direct3dRendering = false; Colors::softwareRendering = true; Colors::noTicker = true; Colors::noTimerUpdate = true; @@ -321,7 +320,7 @@ void Colors::detectSystemResources() qDebug() << "- OpenGL not supported by current build of Qt"; #endif { - Colors::openGlAwailable = false; + Colors::openGlAvailable = false; if (Colors::verbose) qDebug("- OpenGL not recommended on this system"); } @@ -363,7 +362,7 @@ void Colors::postConfigure() if (!Colors::openGlRendering && !Colors::softwareRendering){ // The user has not decided rendering system. So we do it instead: - if (Colors::openGlAwailable) + if (Colors::openGlAvailable) Colors::openGlRendering = true; else Colors::softwareRendering = true; diff --git a/demos/qtdemo/colors.h b/demos/qtdemo/colors.h index b725885..31eb93b 100644 --- a/demos/qtdemo/colors.h +++ b/demos/qtdemo/colors.h @@ -81,9 +81,9 @@ public: static int contentHeight; // properties: + static bool openGlAvailable; static bool openGlRendering; static bool softwareRendering; - static bool direct3dAwailable; static bool xRenderPresent; static bool noAdapt; static bool noTicker; diff --git a/demos/qtdemo/mainwindow.cpp b/demos/qtdemo/mainwindow.cpp index 151fa5c..0da69b2 100644 --- a/demos/qtdemo/mainwindow.cpp +++ b/demos/qtdemo/mainwindow.cpp @@ -101,7 +101,7 @@ void MainWindow::setRenderingSystem() QWidget *viewport = 0; #ifndef QT_NO_OPENGL - else if (Colors::openGlRendering){ + if (Colors::openGlRendering) { QGLWidget *glw = new QGLWidget(QGLFormat(QGL::SampleBuffers)); if (Colors::noScreenSync) glw->format().setSwapInterval(0); @@ -110,9 +110,10 @@ void MainWindow::setRenderingSystem() setCacheMode(QGraphicsView::CacheNone); if (Colors::verbose) qDebug() << "- using OpenGL"; - } + } else // software rendering #endif - else{ // software rendering + { + // software rendering viewport = new QWidget; setCacheMode(QGraphicsView::CacheBackground); if (Colors::verbose) -- cgit v0.12